public class SynchronizedRandomAccessStorageModule extends RandomAccessStorageModule implements IStorageModule
IStorageModule.STORAGEKINDsizeInBlocksVIRTUAL_BLOCK_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedRandomAccessStorageModule(long sizeInBlocks,
RandomAccessFile randomAccessFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
read(byte[] bytes,
int bytesOffset,
int length,
long storageIndex)
Copies bytes from storage to the passed byte array.
|
void |
write(byte[] bytes,
int bytesOffset,
int length,
long storageIndex)
Saves part of the passed byte array's content.
|
checkBounds, close, getSizeInBlocks, openclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckBounds, close, getSizeInBlocksprotected SynchronizedRandomAccessStorageModule(long sizeInBlocks,
RandomAccessFile randomAccessFile)
throws FileNotFoundException
FileNotFoundExceptionpublic void read(byte[] bytes,
int bytesOffset,
int length,
long storageIndex)
throws IOException
RandomAccessStorageModuleread in interface IStorageModuleread in class RandomAccessStorageModulebytes - the array into which the data will be copiedbytesOffset - the position of the first byte in bytes, which
will be filled with data from storagelength - the number of bytes to copystorageIndex - the position of the first byte to be copiedIOExceptionpublic void write(byte[] bytes,
int bytesOffset,
int length,
long storageIndex)
throws IOException
RandomAccessStorageModulewrite in interface IStorageModulewrite in class RandomAccessStorageModulebytes - the source of the data to be storedbytesOffset - offset of the first byte to be storedlength - the number of bytes to be copiedstorageIndex - byte offset in the storage areaIOExceptionCopyright © 2012 University of Konstanz, Distributed Systems Group. All Rights Reserved.