public class ToFileStoreWriter extends Object implements StoreWriter
| Constructor and Description |
|---|
ToFileStoreWriter(File graphDbStoreDir,
org.neo4j.io.fs.FileSystemAbstraction fs,
StoreCopyClient.Monitor monitor,
org.neo4j.io.pagecache.PageCache pageCache,
List<FileMoveAction> fileMoveActions) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
write(String path,
ReadableByteChannel data,
ByteBuffer temporaryBuffer,
boolean hasData,
int requiredElementAlignment)
Pipe the data from the given
ReadableByteChannel to a location given by the path, using the
given temporaryBuffer for buffering if necessary. |
public ToFileStoreWriter(File graphDbStoreDir, org.neo4j.io.fs.FileSystemAbstraction fs, StoreCopyClient.Monitor monitor, org.neo4j.io.pagecache.PageCache pageCache, List<FileMoveAction> fileMoveActions)
public long write(String path, ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData, int requiredElementAlignment) throws IOException
StoreWriterReadableByteChannel to a location given by the path, using the
given temporaryBuffer for buffering if necessary.
The hasData is an effect of the block format not supporting a zero length blocks, whereas a neostore
file may actually be 0 bytes we'll have to keep track of that special case.
The requiredElementAlignment parameter specifies the size in bytes to which the transferred elements
should be aligned. For record store files, this is the record size. For files that have no special alignment
requirements, you should use the value 1 to signify that any alignment will do.write in interface StoreWriterIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface StoreWriterCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.