Class HazelcastQueueAdapter<T>
java.lang.Object
com.norconex.crawler.core.cluster.impl.hazelcast.HazelcastQueueAdapter<T>
- All Implemented Interfaces:
CacheQueue<T>
-
Constructor Summary
ConstructorsConstructorDescriptionHazelcastQueueAdapter(com.hazelcast.collection.IQueue<Object> hzQueue, com.hazelcast.core.HazelcastInstance hzInstance, Class<T> valueType) -
Method Summary
-
Constructor Details
-
HazelcastQueueAdapter
-
-
Method Details
-
add
- Specified by:
addin interfaceCacheQueue<T>
-
poll
- Specified by:
pollin interfaceCacheQueue<T>
-
pollBatch
- Specified by:
pollBatchin interfaceCacheQueue<T>
-
size
public int size()- Specified by:
sizein interfaceCacheQueue<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCacheQueue<T>
-
clear
public void clear()- Specified by:
clearin interfaceCacheQueue<T>
-
isPersistent
public boolean isPersistent()Description copied from interface:CacheQueueReturns whether this queue persists data across restarts.- Specified by:
isPersistentin interfaceCacheQueue<T>- Returns:
- true if the queue is persistent, false if ephemeral
-
getName
Description copied from interface:CacheQueueGets the name of this cache.- Specified by:
getNamein interfaceCacheQueue<T>- Returns:
- cache name
-