@InterfaceAudience.Private class RingBufferTruck extends Object
FSHLog
ring buffer from Handler to WAL.
Has EITHER a FSWALEntry
for making an append OR it has a SyncFuture
to
represent a 'sync' invocation. Truck instances are reused by the disruptor when it gets
around to it so their payload references must be discarded on consumption to release them
to GC.Modifier and Type | Field and Description |
---|---|
private FSWALEntry |
entry |
(package private) static com.lmax.disruptor.EventFactory<RingBufferTruck> |
EVENT_FACTORY
Factory for making a bunch of these.
|
private org.apache.htrace.Span |
span
The tracing span for this entry.
|
private SyncFuture |
syncFuture
Either this syncFuture is set or entry is set, but not both.
|
Constructor and Description |
---|
RingBufferTruck() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
hasFSWALEntryPayload()
|
(package private) boolean |
hasSyncFuturePayload()
|
(package private) void |
loadPayload(FSWALEntry entry,
org.apache.htrace.Span span)
Load the truck with a
FSWALEntry and associated Span . |
(package private) void |
loadPayload(SyncFuture syncFuture)
Load the truck with a
SyncFuture . |
(package private) FSWALEntry |
unloadFSWALEntryPayload()
Unload the truck of its
FSWALEntry payload. |
(package private) org.apache.htrace.Span |
unloadSpanPayload()
Unload the truck of its
Span payload. |
(package private) SyncFuture |
unloadSyncFuturePayload()
Unload the truck of its
SyncFuture payload. |
private SyncFuture syncFuture
private FSWALEntry entry
private org.apache.htrace.Span span
static final com.lmax.disruptor.EventFactory<RingBufferTruck> EVENT_FACTORY
void loadPayload(FSWALEntry entry, org.apache.htrace.Span span)
FSWALEntry
and associated Span
.void loadPayload(SyncFuture syncFuture)
SyncFuture
.boolean hasFSWALEntryPayload()
boolean hasSyncFuturePayload()
FSWALEntry unloadFSWALEntryPayload()
FSWALEntry
payload. The internal refernce is released.SyncFuture unloadSyncFuturePayload()
SyncFuture
payload. The internal refernce is released.org.apache.htrace.Span unloadSpanPayload()
Span
payload. The internal reference is released.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.