Package com.streambase.sb
Class TupleRep.TupleLayout
java.lang.Object
com.streambase.sb.TupleRep.TupleLayout
- All Implemented Interfaces:
Schema.TupleClassInfo
,Serializable
- Enclosing class:
- com.streambase.sb.TupleRep
public static class TupleRep.TupleLayout
extends Object
implements Schema.TupleClassInfo, Serializable
A class that holds information about how the fields in a particular
schema are laid out in memory by TupleRep.
TODO: Consider reducing complexity by having the varData structure be the length of the fields in the tuple.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetField
(int i) Get field at indexint
Get length of fixed data bufferint
getFixedDataOffset
(Schema.Field field) Get fixed data field offsetint
Get number of variable data fieldsint
getVarDataIndex
(Schema.Field field) Get variable field indexgetVarDataType
(int i) Get variable data type at index
-
Constructor Details
-
TupleLayout
TupleLayout(Schema schema) Constructor- Parameters:
schema
- tuple schema
-
-
Method Details
-
getNumVarDataFields
public int getNumVarDataFields()Get number of variable data fields- Returns:
- number of fields
-
getFixedDataBufferLength
public int getFixedDataBufferLength()Get length of fixed data buffer- Returns:
- length
-
getVarDataIndex
Get variable field index- Parameters:
field
- field- Returns:
- index
-
getFixedDataOffset
Get fixed data field offset- Parameters:
field
- field- Returns:
- offset
-
getVarDataType
Get variable data type at index- Parameters:
i
- index- Returns:
- data type
-
getField
Get field at index- Parameters:
i
- field index- Returns:
- field at index
-