|Constructor and Description|
|Modifier and Type||Method and Description|
ReadCache is always closedForWrites
Write the data from the buffer onto the channel.
allocate, bytesWritten, capacity, close, contains, decrementReferenceCount, flush, flush, getCompressorKey, getCounters, getFileExtent, getLastOffset, getReferenceCount, incrementReferenceCount, read, registerWriteStatus, reset, resetRecordMapFromBuffer, resetRecordMapFromBuffer, setFileExtent, setFirstOffset, setRecordMap, toString, write
protected boolean writeOnChannel(ByteBuffer buf, long firstOffset, Map<Long,WriteCache.RecordMetadata> recordMap, long nanos) throws InterruptedException, TimeoutException, IOException
Implementations of this method MAY support gathered writes, depending on
the channel. The necessary information to perform a gathered write is
present in the recordMap. On the other hand, the implementation
MAY require that the records in the cache are laid out for a WORM, in
WriteCache.getFirstOffset() provides the starting offset for the
data to be written. The application MUST coordinate the requirements for
a R/W or WORM store with the use of the
WriteCache and the means
to write on the backing channel.
buf- The data to be written. Only the dirty bytes are visible in this view. The implementation should write all bytes from the current position to the limit.
firstOffset- The offset of the first record in the recordMap into the file (may be relative to a base offset within the file). This is provided as an optimization for the WORM which writes its records contiguously on the backing store.
recordMap- The mapping of record offsets onto metadata about those records.
nanos- The timeout for the operation in nanoseconds.
trueif the operation was completed successfully within the time alloted.
InterruptedException- if the thread was interrupted.
IOException- if there was an IO problem.
public boolean isClosedForWrites()
public void closeForWrites()
WriteCacheServiceto lock buffer content immediately prior to flushing and HA pipline replication. Neither the internal buffer state nor the
WriteCache.recordMapmay be changed once the
WriteCachehas been closed for writes. This is necessary to provide 100% binary replication. Otherwise the stores can differ in the data in freed allocation slots.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.