|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A meganism for storing and retrieving data to a permament back-end. While implementing classes are typically backed by file-based structures, this is in no way a _must_. Inheriting classes must must simply support read/write actions from a 'random' location.
As the IndexManager
also uses instances of this type to
write index nodes as a whole (no seek needed) there are also implementations
that not support seek functionality.
Method Summary | |
void |
close()
|
long |
length()
|
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int offset,
int length)
Read lenght bytes from b , starting at
offset . |
int |
readInt()
|
long |
readLong()
|
void |
seek(long pos)
Introduced because some implementing classes (based on FileOutputStream
and FileInputStream for instance) might not support seek
operations. |
void |
setLength(long length)
Sets the maximum length. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int offset,
int length)
Write lenght bytes from b , starting at
offset . |
void |
writeInt(int value)
|
void |
writeLong(long value)
|
Method Detail |
public void seek(long pos) throws java.io.IOException
Introduced because some implementing classes (based on FileOutputStream
and FileInputStream
for instance) might not support seek
operations. They may throw an UnsupportedOperationException
here, but still support writing and reading.
Implementations of this interface are used in 2 different ways: the
IndexManager
does not perform any seek actions, and thus the
storage implementation it uses can include stream based ones; the
ClusterManager
however does perform seek actions and thus
cannot have a storage implementation with streams in it.
java.lang.UnsupportedOperationException
java.io.IOException
public void write(byte[] b, int offset, int length) throws java.io.IOException
lenght
bytes from b
, starting at
offset
.
java.io.IOException
public void write(byte[] b) throws java.io.IOException
java.io.IOException
public void writeLong(long value) throws java.io.IOException
java.io.IOException
public void writeInt(int value) throws java.io.IOException
java.io.IOException
public void readFully(byte[] b, int offset, int length) throws java.io.IOException
lenght
bytes from b
, starting at
offset
.
java.io.IOException
public void readFully(byte[] b) throws java.io.IOException
java.io.IOException
public long readLong() throws java.io.IOException
java.io.IOException
public int readInt() throws java.io.IOException
java.io.IOException
public void setLength(long length) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public long length() throws java.io.IOException
java.io.IOException
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |