public class FileBasedSPSCQueueMemoryMappedReaderWriter<T> extends Object
Constructor and Description |
---|
FileBasedSPSCQueueMemoryMappedReaderWriter(File file,
int fileSize,
DataSerializer<T> serializer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeForRead() |
void |
closeForWrite() |
boolean |
offer(T t)
Returns true if value written to file or false if not enough space
(writes and end-of-file marker in the fixed-length memory mapped file).
|
FileBasedSPSCQueueMemoryMappedReaderWriter<T> |
openForRead() |
FileBasedSPSCQueueMemoryMappedReaderWriter<T> |
openForWrite() |
T |
poll() |
public FileBasedSPSCQueueMemoryMappedReaderWriter(File file, int fileSize, DataSerializer<T> serializer)
public FileBasedSPSCQueueMemoryMappedReaderWriter<T> openForRead()
public void closeForRead()
public FileBasedSPSCQueueMemoryMappedReaderWriter<T> openForWrite()
public void closeForWrite()
public T poll()
public boolean offer(T t)
t
- value to write to the serialized queuepublic void close()
Copyright © 2013–2016. All rights reserved.