Interface BufferedAppendable
- All Known Subinterfaces:
BufferedAppendableColumn<DATA_TYPE>
,BufferedAppendableTable<COLUMN_IMPL_TYPE>
- All Known Implementing Classes:
AppendableSymbolManager
,ArrayVariableWidthObjectLocalAppendableColumn
,BoundedAppendableSymbolManager
,BufferVariableWidthObjectLocalAppendableColumn
,CharSequenceLocalAppendableColumn
,CompressedStringLocalAppendableColumn
,DateTimeLocalAppendableColumn
,DiskTableWriter
,ExternalizableLocalAppendableColumn
,FixedWidthObjectCodecLocalAppendableColumn
,InstantLocalAppendableColumn
,LocalAppendableColumn
,LocalAppendableTable
,LocalTableWriter
,NanosBackedTimeAppendableColumn
,SerializableLocalAppendableColumn
,StrictAppendableSymbolManager
,StringLocalAppendableColumn
,SymbolLocalAppendableColumn
,SymbolManagerLocalAppendableColumn
,SymbolSetLocalAppendableColumn
,VariableWidthObjectCodecLocalAppendableColumn
,VariableWidthObjectLocalAppendableColumn
public interface BufferedAppendable
Interface for appendable objects with built-in buffering.
In general, all operations but for
force()
should be done on the "writing thread" or
under a lock that also ensures mutually-exclusive writing.-
Method Summary
Modifier and Type Method Description void
close()
Flush all appended data to the underlying store, release any resources held, and force all appended data to be persisted to permanent storage.void
flush()
Write all appended data to the underlying store and prepare for subsequent writes.void
force()
Force all flushed data to be persisted to permanent storage.default boolean
maybeForce()
Perform aforce()
if there is data pending persistence.default void
prepareCheckpoint()
Optional operation.void
release()
Release any resources held.
-
Method Details
-
flush
void flush()Write all appended data to the underlying store and prepare for subsequent writes. Does not implyforce()
. -
prepareCheckpoint
default void prepareCheckpoint() -
force
void force()Force all flushed data to be persisted to permanent storage. Will consistently and atomically persist the last prepared checkpoint in implementations that implementprepareCheckpoint()
. Does not implyflush()
, as this is a distinct operation in all implementations. May be called concurrently by threads other than the "writing thread". -
maybeForce
default boolean maybeForce()Perform aforce()
if there is data pending persistence. Implementations that don't keep track of pending data explicitly will always invokeforce()
pessimistically.- Returns:
- Whether this call may have done any actual work (i.e. there was data pending or assumed to be pending)
-
close
void close()Flush all appended data to the underlying store, release any resources held, and force all appended data to be persisted to permanent storage. This should be the final access to this appendable (if successful) with the exception of any asynchronousforce()
operations. Arelease()
is appropriate afterwards, especially on error. -
release
void release()Release any resources held. Called after an error in preparation for termination. For external callers, this should be done as the final access to this column with the exception of any asynchronousforce()
operations.
-