public class PersistentInMemoryQueue<T extends Queueable> extends InMemoryQueue<T> implements Queue<T>
Queueable
Modifier and Type | Field and Description |
---|---|
protected static Queueable |
DELETE_MARKER |
protected boolean |
isForcedFlush |
application, log, maskedTags, session
Constructor and Description |
---|
PersistentInMemoryQueue(String filename,
QueueableFactory<T> factory)
Deprecated.
|
PersistentInMemoryQueue(String filename,
QueueableFactory<T> factory,
com.epam.fixengine.configuration.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T element)
Add object to the queue.
|
protected boolean |
appendEntryToFile(Queueable entry)
Appends entry to file.
|
void |
clear()
Clears the queue.
|
protected void |
closeStream(InputStream ois) |
void |
commit()
Removes polled object from the queue.
|
void |
initialize()
Initializes queue.
|
void |
shutdown()
Gracefully shutdowns queue.
|
addOutOfTurn, clearOutOfTurn, isAllEmpty, isApplicationCommit, isEmpty, isOutOfTurnOnlyMode, isShutdown, notifyAllApplication, notifyAllSession, poll, setOutOfTurnOnlyMode, size, toArray, totalSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addOutOfTurn, clearOutOfTurn, isAllEmpty, isEmpty, isOutOfTurnOnlyMode, notifyAllApplication, notifyAllSession, poll, setOutOfTurnOnlyMode, size, toArray, totalSize
protected static final Queueable DELETE_MARKER
protected boolean isForcedFlush
@Deprecated public PersistentInMemoryQueue(String filename, QueueableFactory<T> factory)
public PersistentInMemoryQueue(String filename, QueueableFactory<T> factory, com.epam.fixengine.configuration.Configuration conf)
public void initialize()
Queue
initialize
in interface Queue<T extends Queueable>
initialize
in class InMemoryQueue<T extends Queueable>
Queue.initialize()
public void commit()
Queue
commit
in interface Queue<T extends Queueable>
commit
in class InMemoryQueue<T extends Queueable>
Queue.commit()
public void clear()
Queue
clear
in interface Queue<T extends Queueable>
clear
in class InMemoryQueue<T extends Queueable>
Queue.clear()
public boolean add(T element)
Queue
add
in interface Queue<T extends Queueable>
add
in class InMemoryQueue<T extends Queueable>
element
- the elementQueue.add(Queueable)
protected boolean appendEntryToFile(Queueable entry)
Methods append entry to file if it is opened.
Method truncates the file only if entry is DELETE_MARKER
and size of file gr ONE_MEG
.
protected void closeStream(InputStream ois) throws IOException
IOException
public void shutdown()
Queue
shutdown
in interface Queue<T extends Queueable>
shutdown
in class InMemoryQueue<T extends Queueable>
Queue.shutdown()
Copyright © 2000–2022 EPAM Systems. All rights reserved.