public class GarbageCollectingConsumer extends Object implements Runnable, AutoCloseable, DependentOnPointers
Modifier and Type | Class and Description |
---|---|
static interface |
GarbageCollectingConsumer.Collectable |
Modifier and Type | Field and Description |
---|---|
protected TrailingPointer |
trailingPointer |
Constructor and Description |
---|
GarbageCollectingConsumer(Cursor cursor,
Pointer cursorPointer,
WaitStrategy waitStrategy,
GarbageCollectingConsumer.Collectable collectable) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
ignore(Pointer pointer)
Ignore the specified pointer that cursor had previously
stayed behind . |
void |
run() |
void |
stayBehind(Pointer... pointers)
Ensure that this cursor always remains behind the specified pointer.
|
protected final TrailingPointer trailingPointer
public GarbageCollectingConsumer(Cursor cursor, Pointer cursorPointer, WaitStrategy waitStrategy, GarbageCollectingConsumer.Collectable collectable)
public void close()
close
in interface AutoCloseable
public boolean ignore(Pointer pointer)
DependentOnPointers
stayed behind
. This should be called
when the supplied pointer is removed from the ring buffer.ignore
in interface DependentOnPointers
pointer
- the pointer that this cursor may no longer depend uponpublic void stayBehind(Pointer... pointers)
DependentOnPointers
stayBehind
in interface DependentOnPointers
pointers
- the pointers that this cursor may not run past in the ring bufferCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.