Package com.github.ddth.queue.impl
Class AbstractEphemeralSupportQueue<ID,DATA>
- java.lang.Object
-
- com.github.ddth.queue.impl.AbstractQueue<ID,DATA>
-
- com.github.ddth.queue.impl.AbstractEphemeralSupportQueue<ID,DATA>
-
- All Implemented Interfaces:
IQueue<ID,DATA>,AutoCloseable
- Direct Known Subclasses:
AbstractInmemEphemeralQueue,BaseRedisQueue,JdbcQueue,MongodbQueue,RocksDbQueue
public abstract class AbstractEphemeralSupportQueue<ID,DATA> extends AbstractQueue<ID,DATA>
Abstract ephemeral-support queue implementation.- Since:
- 0.5.0
- Author:
- Thanh Nguyen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.ddth.queue.impl.AbstractQueue
AbstractQueue.PutToQueueCase
-
-
Field Summary
-
Fields inherited from interface com.github.ddth.queue.IQueue
SIZE_NOT_SUPPORTED
-
-
Constructor Summary
Constructors Constructor Description AbstractEphemeralSupportQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetEphemeralDisabled()Is ephemeral storage disabled?intgetEphemeralMaxSize()Return a positive integer as max number of items can be stored in the ephemeral storage.booleanisEphemeralDisabled()Is ephemeral storage disabled?AbstractEphemeralSupportQueue<ID,DATA>setEphemeralDisabled(boolean ephemeralDisabled)Disable/Enable ephemeral storage.AbstractEphemeralSupportQueue<ID,DATA>setEphemeralMaxSize(int ephemeralMaxSize)Provide a positive integer to limit size (max number of items) of ephemeral storage.-
Methods inherited from class com.github.ddth.queue.impl.AbstractQueue
close, createMessage, createMessage, createMessage, deserialize, deserialize, destroy, doPutToQueue, getMessageFactory, getQueueName, getSerDeser, init, queue, requeue, requeueSilent, serialize, setMessageFactory, setQueueName, setSerDeser
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.ddth.queue.IQueue
ephemeralSize, finish, getOrphanMessages, queueSize, take
-
-
-
-
Method Detail
-
getEphemeralDisabled
public boolean getEphemeralDisabled()
Is ephemeral storage disabled?- Returns:
-
isEphemeralDisabled
public boolean isEphemeralDisabled()
Is ephemeral storage disabled?- Returns:
-
setEphemeralDisabled
public AbstractEphemeralSupportQueue<ID,DATA> setEphemeralDisabled(boolean ephemeralDisabled)
Disable/Enable ephemeral storage.- Parameters:
ephemeralDisabled-trueto disable ephemeral storage,falseotherwise.- Returns:
-
getEphemeralMaxSize
public int getEphemeralMaxSize()
Return a positive integer as max number of items can be stored in the ephemeral storage.- Returns:
-
setEphemeralMaxSize
public AbstractEphemeralSupportQueue<ID,DATA> setEphemeralMaxSize(int ephemeralMaxSize)
Provide a positive integer to limit size (max number of items) of ephemeral storage.- Parameters:
ephemeralMaxSize-- Returns:
-
-