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 boolean
protected boolean
static final long
static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Atomically removes all of the elements from this queue.void
Initializes queue.void
onCommit
(IQueueable item) protected void
onInsert
(IQueueable item) protected static int
readInt
(byte[] raw, int startPoss) void
setForcedFlush
(boolean isForcedFlush) void
setMaskedTags
(Map<byte[], Set<Integer>> maskedTags) void
setMaxFileSize
(long maxFileSize) void
setNormalFileSize
(long normalFileSize) void
shutdown()
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:IQueue
Initializes queue. That includes restore of previously saved queue content for persistent queues.- Specified by:
initialize
in interfaceIQueue
- Overrides:
initialize
in 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:
onInsert
in classInMemoryQueue
- Throws:
IOException
-
onCommit
- Overrides:
onCommit
in classInMemoryQueue
- Throws:
IOException
-
clear
Description copied from class:InMemoryQueue
Atomically removes all of the elements from this queue. The queue will be empty after this call returns.- Specified by:
clear
in interfaceIQueue
- Overrides:
clear
in classInMemoryQueue
- Throws:
IOException
-
readInt
protected static int readInt(byte[] raw, int startPoss) -
shutdown
public void shutdown()Description copied from interface:IQueue
Gracefully shutdowns queue.- Specified by:
shutdown
in interfaceIQueue
- Overrides:
shutdown
in classInMemoryQueue
- See Also:
-