class ControlLog extends RandomAccessFile implements LogStream
LogStream
interface for the actual reading/writing of control data. The only added
(convenience) method is sync which allows the user to
force synchronization with the underlying device.Modifier and Type | Field and Description |
---|---|
private StreamKey |
key
Key associated with this stream.
|
Constructor and Description |
---|
ControlLog(File file,
StreamKey key)
Constructor that takes a File and StreamKey argument.
|
Modifier and Type | Method and Description |
---|---|
Object |
getKey()
Returns the associated key for this LogStream.
|
(package private) void |
sync()
Forces system buffers to synchronize with the underlying device.
|
close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
private final StreamKey key
ControlLog(File file, StreamKey key) throws IOException
IOException
- if an I/O error occursvoid sync() throws IOException, SyncFailedException
IOException
- if an I/O error occursSyncFailedException
- if the buffers cannot be guaranteed to
have synchronized with physical media.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.