|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.runtime.FennelTupleWriter
public abstract class FennelTupleWriter
FennelTupleWriter defines an interface for marshalling tuples to be sent to Fennel. Implementations are responsible for marshalling specific tuple formats.
Field Summary | |
---|---|
private static long |
MAGIC_NUMBER
Matches fennel/tuple/TupleAccessor.cpp. |
private static FennelTupleAccessor |
tupleAligner
Singleton helper for aligning tuple buffers correctly. |
Constructor Summary | |
---|---|
FennelTupleWriter()
|
Method Summary | |
---|---|
boolean |
marshalTuple(ByteBuffer byteBuffer,
Object object)
Marshals one tuple if it can fit. |
protected abstract void |
marshalTupleOrThrow(ByteBuffer sliceBuffer,
Object object)
Marshals one tuple if it can fit; otherwise, throws either BufferOverflowException or IndexOutOfBoundsException (depending
on whether absolute or relative puts are used). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static long MAGIC_NUMBER
private static FennelTupleAccessor tupleAligner
Constructor Detail |
---|
public FennelTupleWriter()
Method Detail |
---|
protected abstract void marshalTupleOrThrow(ByteBuffer sliceBuffer, Object object)
BufferOverflowException
or IndexOutOfBoundsException
(depending
on whether absolute or relative puts are used).
sliceBuffer
- buffer to be filled with marshalled tuple data; on
entry, the buffer position is 0; on return, the buffer position should be
the unaligned end of the tupleobject
- subclass-specific object to be marshalled
BufferOverflowException
- see above
IndexOutOfBoundsException
- see abovepublic boolean marshalTuple(ByteBuffer byteBuffer, Object object)
byteBuffer
- buffer to be filled with marshalled tuple data,
starting at current buffer position; on return, the buffer position
should be the unaligned end of the tupleobject
- subclass-specific object to be marshalled
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |