Class SpscOffHeapIntQueue
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final intstatic final byte -
Constructor Summary
ConstructorsConstructorDescriptionSpscOffHeapIntQueue(int capacity) SpscOffHeapIntQueue(ByteBuffer buff, int capacity, byte viewMask) This is to be used for an IPC queue with the direct buffer used being a memory mapped file. -
Method Summary
Methods inherited from class AbstractCollection
contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Field Details
-
PRODUCER
public static final byte PRODUCER- See Also:
-
CONSUMER
public static final byte CONSUMER- See Also:
-
INT_ELEMENT_SCALE
public static final int INT_ELEMENT_SCALE
-
-
Constructor Details
-
SpscOffHeapIntQueue
public SpscOffHeapIntQueue(int capacity) -
SpscOffHeapIntQueue
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.- Parameters:
buff-capacity-viewMask-
-
-
Method Details
-
getRequiredBufferSize
public static int getRequiredBufferSize(int capacity) -
offer
-
offerInt
public boolean offerInt(int e) -
poll
-
pollInt
public int pollInt() -
peek
-
peekInt
public int peekInt() -
size
public int size()- Specified by:
sizein interfaceCollection<Integer>- Specified by:
sizein classAbstractCollection<Integer>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Integer>- Overrides:
isEmptyin classAbstractCollection<Integer>
-
iterator
-