com.hazelcast.map.impl.mapstore.writebehind
Interface WriteBehindQueue<E>

Type Parameters:
E - Type of entry to be stored.

public interface WriteBehindQueue<E>

Main contract for write behind queues which are used for map store operations.


Method Summary
 void addEnd(Collection<E> collection)
          Add this collection to the end of the queue.
 void addFront(Collection<E> collection)
          Add this collection to the front of the queue.
 List<E> asList()
          Returns list representation of this queue.
 void clear()
           
 List<E> filterItems(long now)
          Returns list of entries smaller than specific time.
 E get(E e)
          Gets item.
 List<DelayedEntry> get(int count)
          Returns supplied number of entries from the start.
 E getFirst()
          Gets first item in queue.
 WriteBehindQueue<E> getSnapShot()
           
 boolean isEnabled()
          Empty or a real queue.
 boolean offer(E e)
          adds to the end.
 List<E> removeAll()
          Removes and returns all items in this queue.
 void removeAll(Collection<E> collection)
          Removes all items in collection from queue.
 void removeFirst()
          removes head of the queue.
 int size()
           
 

Method Detail

offer

boolean offer(E e)
adds to the end.

Parameters:
e - item to be offered
Returns:
true if added, false otherwise.

get

E get(E e)
Gets item.

Parameters:
e - item to be offered
Returns:
corresponding item from queue or null.

getFirst

E getFirst()
Gets first item in queue.

Returns:
corresponding item from queue or null.

removeFirst

void removeFirst()
removes head of the queue.


size

int size()

clear

void clear()

getSnapShot

WriteBehindQueue<E> getSnapShot()
Returns:
A copy of queue at that moment. Returned copy has same characteristics with the original.

addFront

void addFront(Collection<E> collection)
Add this collection to the front of the queue.

Parameters:
collection - collection to be added in front of this queue.

addEnd

void addEnd(Collection<E> collection)
Add this collection to the end of the queue.

Parameters:
collection - collection to be added end of this queue.

removeAll

void removeAll(Collection<E> collection)
Removes all items in collection from queue.

Parameters:
collection - collection to be removed.

removeAll

List<E> removeAll()
Removes and returns all items in this queue.

Returns:
removed items in this queue.

isEnabled

boolean isEnabled()
Empty or a real queue.


asList

List<E> asList()
Returns list representation of this queue.

Returns:
list representation of this queue.

filterItems

List<E> filterItems(long now)
Returns list of entries smaller than specific time.

Parameters:
now - now in millis.
Returns:
entries to process according to time.

get

List<DelayedEntry> get(int count)
Returns supplied number of entries from the start.

Parameters:
count - number of entries to return.
Returns:
list of entries


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.