Class EntityResponse
-
- All Implemented Interfaces:
-
java.io.Externalizable
,java.io.Serializable
,java.lang.Comparable
,org.apache.avro.generic.GenericContainer
,org.apache.avro.generic.GenericRecord
,org.apache.avro.generic.IndexedRecord
,org.apache.avro.specific.SpecificRecord
public class EntityResponse extends SpecificRecordBase implements SpecificRecord
The response to an EntityRequest.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
EntityResponse.Builder
RecordBuilder for EntityResponse instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public List<ByteBuffer>
results
public KeyValuePairList
metadata
public ByteBuffer
resumePoint
-
Constructor Summary
Constructors Constructor Description EntityResponse()
Default constructor. EntityResponse(List<ByteBuffer> results, KeyValuePairList metadata, ByteBuffer resumePoint)
All-args constructor.
-
Method Summary
Modifier and Type Method Description List<ByteBuffer>
getResults()
Gets the value of the 'results' field. void
setResults(List<ByteBuffer> value)
Sets the value of the 'results' field. KeyValuePairList
getMetadata()
Gets the value of the 'metadata' field. void
setMetadata(KeyValuePairList value)
Sets the value of the 'metadata' field. ByteBuffer
getResumePoint()
Gets the value of the 'resumePoint' field. void
setResumePoint(ByteBuffer value)
Sets the value of the 'resumePoint' field. static Schema
getClassSchema()
static BinaryMessageEncoder<EntityResponse>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<EntityResponse>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<EntityResponse>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this EntityResponse to a ByteBuffer. static EntityResponse
fromByteBuffer(ByteBuffer b)
Deserializes a EntityResponse from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static EntityResponse.Builder
newBuilder()
Creates a new EntityResponse RecordBuilder. static EntityResponse.Builder
newBuilder(EntityResponse.Builder other)
Creates a new EntityResponse RecordBuilder by copying an existing Builder. static EntityResponse.Builder
newBuilder(EntityResponse other)
Creates a new EntityResponse RecordBuilder by copying an existing EntityResponse instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
void
customEncode(Encoder out)
void
customDecode(ResolvingDecoder in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
EntityResponse
EntityResponse()
Default constructor.
-
EntityResponse
EntityResponse(List<ByteBuffer> results, KeyValuePairList metadata, ByteBuffer resumePoint)
All-args constructor.- Parameters:
results
- Result of request, as a list of AMQP-formatted user defined objects, which may be empty or have 1 element for certain persistence operationsmetadata
- Metadata returned from the execution of the persistence operationresumePoint
- Used by queries that support stable paging to return opaque data that indicates where the next page should resume from
-
-
Method Detail
-
getResults
List<ByteBuffer> getResults()
Gets the value of the 'results' field.
- Returns:
Result of request, as a list of AMQP-formatted user defined objects, which may be empty or have 1 element for certain persistence operations
-
setResults
void setResults(List<ByteBuffer> value)
Sets the value of the 'results' field. Result of request, as a list of AMQP-formatted user defined objects, which may be empty or have 1 element for certain persistence operations
- Parameters:
value
- the value to set.
-
getMetadata
KeyValuePairList getMetadata()
Gets the value of the 'metadata' field.
- Returns:
Metadata returned from the execution of the persistence operation
-
setMetadata
void setMetadata(KeyValuePairList value)
Sets the value of the 'metadata' field. Metadata returned from the execution of the persistence operation
- Parameters:
value
- the value to set.
-
getResumePoint
ByteBuffer getResumePoint()
Gets the value of the 'resumePoint' field.
- Returns:
Used by queries that support stable paging to return opaque data that indicates where the next page should resume from
-
setResumePoint
void setResumePoint(ByteBuffer value)
Sets the value of the 'resumePoint' field. Used by queries that support stable paging to return opaque data that indicates where the next page should resume from
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<EntityResponse> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
- Returns:
the message encoder used by this class
-
getDecoder
static BinaryMessageDecoder<EntityResponse> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
- Returns:
the message decoder used by this class
-
createDecoder
static BinaryMessageDecoder<EntityResponse> createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
- Parameters:
resolver
- a SchemaStore used to find schemas by fingerprint- Returns:
a BinaryMessageDecoder instance for this class backed by the given SchemaStore
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this EntityResponse to a ByteBuffer.
- Returns:
a buffer holding the serialized data for this instance
-
fromByteBuffer
static EntityResponse fromByteBuffer(ByteBuffer b)
Deserializes a EntityResponse from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class- Returns:
a EntityResponse instance decoded from the given buffer
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static EntityResponse.Builder newBuilder()
Creates a new EntityResponse RecordBuilder.
- Returns:
A new EntityResponse RecordBuilder
-
newBuilder
static EntityResponse.Builder newBuilder(EntityResponse.Builder other)
Creates a new EntityResponse RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.- Returns:
A new EntityResponse RecordBuilder
-
newBuilder
static EntityResponse.Builder newBuilder(EntityResponse other)
Creates a new EntityResponse RecordBuilder by copying an existing EntityResponse instance.
- Parameters:
other
- The existing instance to copy.- Returns:
A new EntityResponse RecordBuilder
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
customEncode
void customEncode(Encoder out)
-
customDecode
void customDecode(ResolvingDecoder in)
-
-
-
-