public class TreetankStorageModule extends Object implements org.jscsi.target.storage.IStorageModule
This implementation is used to store data into treetank via an iscsi target.
Modifier and Type | Field and Description |
---|---|
static int |
BLOCKS_IN_DATA
Number of Blocks in one Cluster.
|
static int |
BYTES_IN_DATA
Number of Bytes in Bucket.
|
Constructor and Description |
---|
TreetankStorageModule(long pNodeNumber,
ISession pSession)
Creates a storage module that is used by the target to handle I/O.
|
Modifier and Type | Method and Description |
---|---|
int |
checkBounds(long logicalBlockAddress,
int transferLengthInBlocks) |
void |
close() |
long |
getSizeInBlocks() |
void |
read(byte[] bytes,
long storageIndex) |
void |
write(byte[] bytes,
long storageIndex) |
public static final int BLOCKS_IN_DATA
public static final int BYTES_IN_DATA
public TreetankStorageModule(long pNodeNumber, ISession pSession) throws TTException
pNodeNumber
- Define how many nodes the storage holds.pSession
- Pass the sessiona associated to the location to this class.TTException
- will be thrown if there are problems creating this storage.public int checkBounds(long logicalBlockAddress, int transferLengthInBlocks)
checkBounds
in interface org.jscsi.target.storage.IStorageModule
public long getSizeInBlocks()
getSizeInBlocks
in interface org.jscsi.target.storage.IStorageModule
public void read(byte[] bytes, long storageIndex) throws IOException
read
in interface org.jscsi.target.storage.IStorageModule
IOException
public void write(byte[] bytes, long storageIndex) throws IOException
write
in interface org.jscsi.target.storage.IStorageModule
IOException
public void close() throws IOException
close
in interface org.jscsi.target.storage.IStorageModule
IOException
Copyright © 2013. All Rights Reserved.