public class SossStruct extends Struct implements ResourceAllocationValidator
Struct
to use native byte ordering, since that's what
the ScaleOut server uses.Modifier and Type | Class and Description |
---|---|
class |
SossStruct.EnumWithInt16Value<E extends java.lang.Enum<E> & HasValue<java.lang.Short>>
A
Struct.Member for Enum classes that have explicit value assignments. |
class |
SossStruct.EnumWithInt32Value<E extends java.lang.Enum<E> & HasValue<java.lang.Integer>>
A
Struct.Member for Enum classes that have explicit value assignments. |
class |
SossStruct.Int16
An optimized version of
Struct.Signed16 which depends on the top-most struct
calling memberInitializationComplete() in its constructor after all
field initializers have run. |
class |
SossStruct.Int32
An optimized version of
Struct.Signed32 which depends on the top-most struct
calling memberInitializationComplete() in its constructor after all
field initializers have run. |
class |
SossStruct.Int8
An optimized version of
Struct.Signed16 which depends on the top-most struct
calling memberInitializationComplete() in its constructor after all
field initializers have run. |
class |
SossStruct.UInt32
An optimized version of
Struct.Unsigned32 which depends on the top-most struct
calling memberInitializationComplete() in its constructor after all
field initializers have run. |
Struct.Bool, Struct.Enum16, Struct.Enum32, Struct.Enum64, Struct.Enum8, Struct.Float32, Struct.Float64, Struct.InstanceFactory<S>, Struct.Member, Struct.Reference32<S extends Struct>, Struct.Reference64<S extends Struct>, Struct.Signed16, Struct.Signed32, Struct.Signed64, Struct.Signed8, Struct.Unsigned16, Struct.Unsigned32, Struct.Unsigned8, Struct.UTF8String
Constructor and Description |
---|
SossStruct() |
Modifier and Type | Method and Description |
---|---|
byte[] |
array() |
java.nio.ByteOrder |
byteOrder()
Returns the byte order for this struct (configurable).
|
int |
decrementUseCount() |
void |
deserialize(java.nio.ByteBuffer buf) |
protected <M extends Struct.Member> |
fillArray(M[] arrayMember)
Fill the parameter arrayMember with values of type M.
|
int |
incrementUseCount() |
protected <S extends Struct> |
inner(S struct)
Defines the specified struct as inner of this struct.
|
protected java.nio.ByteBuffer |
newBuffer(int capacity) |
void |
serialize(java.nio.ByteBuffer buf) |
address, array, array, array, array, array, array, array, array, array, fillArray, fillArray, fillArray, getByteBuffer, getByteBufferPosition, isPacked, isUnion, outerStruct, read, setByteBuffer, setByteBufferPosition, size, toString, write
public java.nio.ByteOrder byteOrder()
Struct
Returns the byte order for this struct (configurable). The byte order is inherited by inner structs. Sub-classes may change the byte order by overriding this method. For example: [code] public class TopStruct extends Struct { ... // Members initialization. public ByteOrder byteOrder() { // TopStruct and its inner structs use hardware byte order. return ByteOrder.nativeOrder(); } }}[/code]
protected java.nio.ByteBuffer newBuffer(int capacity)
protected <S extends Struct> S inner(S struct)
Struct
public void serialize(java.nio.ByteBuffer buf)
public void deserialize(java.nio.ByteBuffer buf)
public byte[] array()
public int decrementUseCount()
decrementUseCount
in interface ResourceAllocationValidator
public int incrementUseCount()
incrementUseCount
in interface ResourceAllocationValidator
protected <M extends Struct.Member> void fillArray(M[] arrayMember)
Struct
Fill the parameter arrayMember with values of type M.
If you add aStruct.Member
subclass that isn't covered here, you should
override this method (not
Struct.array(com.scaleoutsoftware.soss.client.util.Struct.Member[])
),
providing support for your Struct.Member
subclass and then delegating to
the super class for everything else.