public class SynchronizedRandomAccessStorageModule extends RandomAccessStorageModule implements IStorageModule
sizeInBlocksVIRTUAL_BLOCK_SIZE| Constructor and Description |
|---|
SynchronizedRandomAccessStorageModule(long sizeInBlocks,
File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
read(byte[] bytes,
long storageIndex)
Copies bytes from storage to the passed byte array.
|
void |
write(byte[] bytes,
long storageIndex)
Saves part of the passed byte array's content.
|
checkBounds, close, getSizeInBlocks, open, recursiveDeleteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckBounds, close, getSizeInBlockspublic SynchronizedRandomAccessStorageModule(long sizeInBlocks,
File file)
throws FileNotFoundException
FileNotFoundExceptionpublic void read(byte[] bytes,
long storageIndex)
throws IOException
RandomAccessStorageModuleread in interface IStorageModuleread in class RandomAccessStorageModulebytes - the array into which the data will be copied will be filled with data from storagestorageIndex - the position of the first byte to be copiedIOExceptionpublic void write(byte[] bytes,
long storageIndex)
throws IOException
RandomAccessStorageModulewrite in interface IStorageModulewrite in class RandomAccessStorageModulebytes - the source of the data to be storedstorageIndex - byte offset in the storage areaIOExceptionCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.