|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Unboxed<V extends java.io.Serializable>
A class which knows how to intrepret sequences of bytes as an object. We use this singleton class which performs operations (such as comparisons) directly on the byte[]'s rather than using some instance of Serializable&Comparable because the latter approach puts heavy stress on the garbage collector and -- much more importantly -- the memory subsystem. By not instantiating heavyweight objects for the keys we let the whole program live lower in the meomory hierarchy. GC is nice, except in your innermost loops.
Method Summary | |
---|---|
V |
deserialize(byte[] buf,
int ofs)
Deserialize a value; need not be compatible with V.readObject()! |
int |
getSize()
Return the size, in bytes, of a value; all values must have the same size |
void |
serialize(V v,
byte[] buf,
int ofs)
Serialize a value; need not be compatible with V.writeObject()! |
Method Detail |
---|
int getSize()
V deserialize(byte[] buf, int ofs)
void serialize(V v, byte[] buf, int ofs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |