public class SynchronizedRandomAccessStorageModule extends RandomAccessStorageModule implements IStorageModule
sizeInBlocks
VIRTUAL_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, recursiveDelete
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkBounds, close, getSizeInBlocks
public SynchronizedRandomAccessStorageModule(long sizeInBlocks, File file) throws FileNotFoundException
FileNotFoundException
public void read(byte[] bytes, long storageIndex) throws IOException
RandomAccessStorageModule
read
in interface IStorageModule
read
in class RandomAccessStorageModule
bytes
- the array into which the data will be copied will be filled with data from storagestorageIndex
- the position of the first byte to be copiedIOException
public void write(byte[] bytes, long storageIndex) throws IOException
RandomAccessStorageModule
write
in interface IStorageModule
write
in class RandomAccessStorageModule
bytes
- the source of the data to be storedstorageIndex
- byte offset in the storage areaIOException
Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.