Class PersistentInMemoryQueue
java.lang.Object
com.epam.fixengine.jms.storage.queue.InMemoryQueue
com.epam.fixengine.jms.storage.queue.PersistentInMemoryQueue
- All Implemented Interfaces:
IQueue
Implementation of persist queue.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanprotected booleanstatic final longstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Atomically removes all of the elements from this queue.voidInitializes queue.voidonCommit(IQueueable item) protected voidonInsert(IQueueable item) protected static intreadInt(byte[] raw, int startPoss) voidsetForcedFlush(boolean isForcedFlush) voidsetMaskedTags(Map<byte[], Set<Integer>> maskedTags) voidsetMaxFileSize(long maxFileSize) voidsetNormalFileSize(long normalFileSize) voidshutdown()Gracefully shutdowns queue.Methods inherited from class com.epam.fixengine.jms.storage.queue.InMemoryQueue
add, add, addRestored, commit, commit, failedProcessing, failedProcessing, isEmpty, isEmptyInner, poll, resetSeqNum, setSeqNum, size, take, take
-
Field Details
-
DEBUG_ENABLED
public static final boolean DEBUG_ENABLED -
NORMAL_FILE_SIZE
public static final long NORMAL_FILE_SIZE- See Also:
-
MAX_FILE_SIZE
public static final long MAX_FILE_SIZE- See Also:
-
maskedTags
-
isForcedFlush
protected boolean isForcedFlush
-
-
Constructor Details
-
PersistentInMemoryQueue
-
-
Method Details
-
initialize
Description copied from interface:IQueueInitializes queue. That includes restore of previously saved queue content for persistent queues.- Specified by:
initializein interfaceIQueue- Overrides:
initializein classInMemoryQueue- Throws:
IOException- See Also:
-
setNormalFileSize
public void setNormalFileSize(long normalFileSize) -
setMaxFileSize
public void setMaxFileSize(long maxFileSize) -
setMaskedTags
-
setForcedFlush
public void setForcedFlush(boolean isForcedFlush) -
onInsert
- Overrides:
onInsertin classInMemoryQueue- Throws:
IOException
-
onCommit
- Overrides:
onCommitin classInMemoryQueue- Throws:
IOException
-
clear
Description copied from class:InMemoryQueueAtomically removes all of the elements from this queue. The queue will be empty after this call returns.- Specified by:
clearin interfaceIQueue- Overrides:
clearin classInMemoryQueue- Throws:
IOException
-
readInt
protected static int readInt(byte[] raw, int startPoss) -
shutdown
public void shutdown()Description copied from interface:IQueueGracefully shutdowns queue.- Specified by:
shutdownin interfaceIQueue- Overrides:
shutdownin classInMemoryQueue- See Also:
-