|
|||||||||||
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(File dir,
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(File dir, String name, int maxBlockSize) throws IOException
dir
- directory where to create the data blocksname
- for the data block namesmaxBlockSize
- maximum size (in bytes) of the data blocks
IOException
Method Detail |
void deleteAll()
public boolean isEmpty()
public long length()
public int size()
public void write(byte[] data) throws IOException
data
-
IOException
public byte[] read() throws IOException
IOException
public void close() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |