|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.message.util.DataContainer
A DataContainer handles file persistence for a DiskBoundedQueue The DataContainer is a temporary data structure, that is only designed to exist for the lifetime of the application
Constructor Summary | |
(package private) |
DataContainer(java.io.File dir,
java.lang.String name,
int maxBlockSize)
Constructor for the data container |
Method Summary | |
void |
close()
close the DataContainer and corresponding FileDataBlocks |
(package private) void |
deleteAll()
Delete all previous files of the same suffix in the directory |
boolean |
isEmpty()
|
long |
length()
|
byte[] |
read()
read a block of data from the container |
int |
size()
|
void |
write(byte[] data)
write a block of data into the Container |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
DataContainer(java.io.File dir, java.lang.String name, int maxBlockSize) throws java.io.IOException
dir
- directory where to create the data blocksname
- for the data block namesmaxBlockSize
- maximum size (in bytes) of the data blocks
java.io.IOException
Method Detail |
void deleteAll()
public boolean isEmpty()
public long length()
public int size()
public void write(byte[] data) throws java.io.IOException
data
-
java.io.IOException
public byte[] read() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |