|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.auxiliary.disk.indexed.IndexedDisk
Provides thread safe access to the underlying random access file.
Field Summary | |
private java.lang.String |
filepath
|
private static org.apache.commons.logging.Log |
log
|
private java.io.RandomAccessFile |
raf
|
Constructor Summary | |
(package private) |
IndexedDisk(java.io.File file)
Constructor for the Disk object |
Method Summary | |
(package private) boolean |
append(byte[] data)
Appends byte array to the Disk. |
(package private) IndexedDiskElementDescriptor |
appendObject(CacheElement obj)
Description of the Method |
(package private) void |
close()
Closes the raf. |
(package private) long |
length()
Returns the raf length. |
(package private) java.io.Serializable |
readObject(long pos)
Description of the Method |
(package private) void |
reset()
Sets the raf to empty. |
(package private) static byte[] |
serialize(java.io.Serializable obj)
Returns the serialized form of the given object in a byte array. |
(package private) boolean |
write(byte[] data,
long pos)
Writes the given byte array to the Disk at the specified position. |
(package private) boolean |
writeObject(java.io.Serializable obj,
long pos)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
private final java.lang.String filepath
private java.io.RandomAccessFile raf
Constructor Detail |
IndexedDisk(java.io.File file) throws java.io.FileNotFoundException
file
-
java.io.FileNotFoundException
Method Detail |
java.io.Serializable readObject(long pos)
pos
-
boolean append(byte[] data)
data
-
boolean write(byte[] data, long pos)
data
- pos
-
boolean writeObject(java.io.Serializable obj, long pos)
obj
- pos
-
IndexedDiskElementDescriptor appendObject(CacheElement obj)
obj
-
long length() throws java.io.IOException
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
void reset() throws java.io.IOException
java.io.IOException
static byte[] serialize(java.io.Serializable obj) throws java.io.IOException
obj
-
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |