File used
number of 16-byte blocks per page
encryption key information getter
name of the index used to retrieve the key
file name
file pointer
number of 16-byte blocks per page
encryption key information getter
name of index used to retrieve key
Flushes out the data from the writer buffer to the disk.
Flushes out the data from the writer buffer to the disk.
true if need to force changes to both the file's content and the metadata written to storage; otherwise, only need to force content changes to be written
Closes the reader and the writer.
Closes the reader and the writer.
Overrides lock to throw an UnsupportedOperationException.
Overrides lock to throw an UnsupportedOperationException.
the position at which the locked region is to start; must be non-negative
the size of the locked region; must be non-negative, and the sum position size must be non-negative
true to request a shared lock (this channel must be open for reading and possibly writing); false to request an exclusive lock (this channel must be open for writing and possibly reading)
Overrides map to throw an UnsupportedOperationException.
Overrides map to throw an UnsupportedOperationException.
file is to be mapped read-only, read/write, or privately (copy-on-write), respectively
the position within the file at which the mapped region is to start; must be non-negative
the size of the region to be mapped; must be non-negative and no greater than MAX_VALUE
Overrides position to throw an UnsupportedOperationException.
Overrides position to throw an UnsupportedOperationException.
the new position, a non-negative integer counting the number of bytes from the start of the entity
Overrides position to throw an UnsupportedOperationException.
Overrides position to throw an UnsupportedOperationException.
Read bytes from the file into the given byte array.
Read bytes from the file into the given byte array.
byte array to copy bytes to
the file position at which the transfer is to begin; must be non-negative
-1 if eof has been reached, the number of bytes copied into b otherwise.
Read bytes from the file into the given byte array.
Read bytes from the file into the given byte array.
byte array to copy bytes to
position in b to start copying data
number of bytes to be copied
-1 if eof has been reached, the number of bytes copied into b otherwise.
Read bytes from the file into the given byte array.
Read bytes from the file into the given byte array.
byte array to copy bytes to
-1 if eof has been reached, the number of bytes copied into b otherwise.
Overrides size to throw an UnsupportedOperationException.
Overrides size to throw an UnsupportedOperationException.
Overrides transferFrom to throw an UnsupportedOperationException.
Overrides transferFrom to throw an UnsupportedOperationException.
the source channel
the position within the file at which the transfer is to begin; must be non-negative
the maximum number of bytes to be transferred; must be non-negative
Overrides transferTo to throw an UnsupportedOperationException.
Overrides transferTo to throw an UnsupportedOperationException.
the position within the file at which the transfer is to begin; must be non-negative
the maximum number of bytes to be transferred; must be non-negative
the target channel
Overrides truncate to throw an UnsupportedOperationException.
Overrides truncate to throw an UnsupportedOperationException.
the new size, a non-negative byte count
Overrides tryLock to throw an UnsupportedOperationException.
Overrides tryLock to throw an UnsupportedOperationException.
the position at which the locked region is to start; must be non-negative
the size of the locked region; must be non-negative, and the sum position size must be non-negative
true to request a shared lock; false to request an exclusive lock
Writes data to disk starting from a given position.
Writes data to disk starting from a given position.
the buffer from which bytes are to be transferred
the file position at which the transfer is to begin; must be non-negative
the number of bytes copied into the buffer cache
Writes a section of data to disk.
Writes a section of data to disk.
data to be written
offset in the data
number of bytes to be written
the number of bytes written into disk
Writes data to disk.
Writes data to disk.
the buffer from which bytes are to be retrieved
the number of bytes copied into the buffer cache
Two issues here: (1) AESReader should only be instantiated for existent files - maybe there should be an open method? (2) AESWriter should only be instantiated on non-existent files - does ES guarantee that for translog?
In any case, to support both, we have to at least lazily open AESReader and AESWriter only as needed.... Simply using lazy here seems too easy.
Class representing an EncryptedFileChannel that creates an AESReader and an AESWriter and reads files and writes to disk. Extension of java.nio.channels.FileChannel that instantiates an AESReader and AESWriter to encrypt all reads and writes. Utilized in EncryptedRafReference and EncryptedTranslogStream.