public class PersistentInMemoryQueue extends InMemoryQueue
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_ENABLED |
protected boolean |
isForcedFlush |
protected Map<byte[],Set<Integer>> |
maskedTags |
static long |
MAX_FILE_SIZE |
static long |
NORMAL_FILE_SIZE |
Constructor and Description |
---|
PersistentInMemoryQueue(int capacity,
String filename,
long publishTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Atomically removes all of the elements from this queue.
|
void |
initialize()
Initializes queue.
|
void |
onCommit(IQueueable item) |
protected void |
onInsert(IQueueable item) |
void |
setForcedFlush(boolean isForcedFlush) |
void |
setMaskedTags(Map<byte[],Set<Integer>> maskedTags) |
void |
setMaxFileSize(long maxFileSize) |
void |
setNormalFileSize(long normalFileSize) |
void |
shutdown()
Gracefully shutdowns queue.
|
add, addRestored, commit, commit, failedProcessing, failedProcessing, isEmpty, isEmptyInner, poll, resetSeqNum, setSeqNum, size, take, take
public static final boolean DEBUG_ENABLED
public static final long NORMAL_FILE_SIZE
public static final long MAX_FILE_SIZE
protected boolean isForcedFlush
public PersistentInMemoryQueue(int capacity, String filename, long publishTimeout)
public void initialize() throws IOException
IQueue
initialize
in interface IQueue
initialize
in class InMemoryQueue
IOException
IQueue.initialize()
public void setNormalFileSize(long normalFileSize)
public void setMaxFileSize(long maxFileSize)
public void setForcedFlush(boolean isForcedFlush)
protected void onInsert(IQueueable item) throws IOException
onInsert
in class InMemoryQueue
IOException
public void onCommit(IQueueable item) throws IOException
onCommit
in class InMemoryQueue
IOException
public void clear() throws IOException
InMemoryQueue
clear
in interface IQueue
clear
in class InMemoryQueue
IOException
public void shutdown()
IQueue
shutdown
in interface IQueue
shutdown
in class InMemoryQueue
IQueue.shutdown()
Copyright © 2000–2022 EPAM Systems. All rights reserved.