public class WritableChunkFileChannel extends AbstractChunkFileChannel implements WritableJslipcByteChannel
WritableJslipcByteChannel
implementation that writes the data as
chunk files into a given directory. During writing
,
the file is named .chunk_xx.tmp
, where xx
is the index of the chunk.
Once the complete buffer is written, the file is renamed to .chunk_xx
in
order to signal a consuming ReadableChunkFileChannel
that is chunk is completely
written and may be read.JslipcChannel.JslipcChannelState
CHUNK_FILE_NAME
Constructor and Description |
---|
WritableChunkFileChannel(File directory) |
Modifier and Type | Method and Description |
---|---|
protected File |
getNextChunk() |
int |
write(ByteBuffer src) |
checkClosed, cleanUpOnClose, close, getCloseMarker, getDirectory, getFilenameFilter, getState, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getState
public WritableChunkFileChannel(File directory)
public int write(ByteBuffer src) throws IOException
write
in interface WritableByteChannel
IOException
protected File getNextChunk()
Copyright © 2014. All Rights Reserved.