Class TokenClaimQueryResult
-
- 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 TokenClaimQueryResult extends SpecificRecordBase implements SpecificRecord
Represents the result of a claim query, sent back to the flow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
TokenClaimQueryResult.Builder
RecordBuilder for TokenClaimQueryResult instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public TokenPoolCacheKey
poolKey
public String
claimId
public TokenClaimResultStatus
resultType
public List<Token>
claimedTokens
-
Constructor Summary
Constructors Constructor Description TokenClaimQueryResult()
Default constructor. TokenClaimQueryResult(TokenPoolCacheKey poolKey, String claimId, TokenClaimResultStatus resultType, List<Token> claimedTokens)
All-args constructor.
-
Method Summary
Modifier and Type Method Description TokenPoolCacheKey
getPoolKey()
Gets the value of the 'poolKey' field. void
setPoolKey(TokenPoolCacheKey value)
Sets the value of the 'poolKey' field. String
getClaimId()
Gets the value of the 'claimId' field. void
setClaimId(String value)
Sets the value of the 'claimId' field. TokenClaimResultStatus
getResultType()
Gets the value of the 'resultType' field. void
setResultType(TokenClaimResultStatus value)
Sets the value of the 'resultType' field. List<Token>
getClaimedTokens()
Gets the value of the 'claimedTokens' field. void
setClaimedTokens(List<Token> value)
Sets the value of the 'claimedTokens' field. static Schema
getClassSchema()
static BinaryMessageEncoder<TokenClaimQueryResult>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<TokenClaimQueryResult>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<TokenClaimQueryResult>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this TokenClaimQueryResult to a ByteBuffer. static TokenClaimQueryResult
fromByteBuffer(ByteBuffer b)
Deserializes a TokenClaimQueryResult from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static TokenClaimQueryResult.Builder
newBuilder()
Creates a new TokenClaimQueryResult RecordBuilder. static TokenClaimQueryResult.Builder
newBuilder(TokenClaimQueryResult.Builder other)
Creates a new TokenClaimQueryResult RecordBuilder by copying an existing Builder. static TokenClaimQueryResult.Builder
newBuilder(TokenClaimQueryResult other)
Creates a new TokenClaimQueryResult RecordBuilder by copying an existing TokenClaimQueryResult 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
-
TokenClaimQueryResult
TokenClaimQueryResult()
Default constructor.
-
TokenClaimQueryResult
TokenClaimQueryResult(TokenPoolCacheKey poolKey, String claimId, TokenClaimResultStatus resultType, List<Token> claimedTokens)
All-args constructor.- Parameters:
poolKey
- Key for the pool the tokens were claimed fromclaimId
- Unique identifier for the claimresultType
- The type of result for the claim queryclaimedTokens
- The new value for claimedTokens
-
-
Method Detail
-
getPoolKey
TokenPoolCacheKey getPoolKey()
Gets the value of the 'poolKey' field.
- Returns:
Key for the pool the tokens were claimed from
-
setPoolKey
void setPoolKey(TokenPoolCacheKey value)
Sets the value of the 'poolKey' field. Key for the pool the tokens were claimed from
- Parameters:
value
- the value to set.
-
getClaimId
String getClaimId()
Gets the value of the 'claimId' field.
- Returns:
Unique identifier for the claim
-
setClaimId
void setClaimId(String value)
Sets the value of the 'claimId' field. Unique identifier for the claim
- Parameters:
value
- the value to set.
-
getResultType
TokenClaimResultStatus getResultType()
Gets the value of the 'resultType' field.
- Returns:
The type of result for the claim query
-
setResultType
void setResultType(TokenClaimResultStatus value)
Sets the value of the 'resultType' field. The type of result for the claim query
- Parameters:
value
- the value to set.
-
getClaimedTokens
List<Token> getClaimedTokens()
Gets the value of the 'claimedTokens' field.
- Returns:
The value of the 'claimedTokens' field.
-
setClaimedTokens
void setClaimedTokens(List<Token> value)
Sets the value of the 'claimedTokens' field.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<TokenClaimQueryResult> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
- Returns:
the message encoder used by this class
-
getDecoder
static BinaryMessageDecoder<TokenClaimQueryResult> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
- Returns:
the message decoder used by this class
-
createDecoder
static BinaryMessageDecoder<TokenClaimQueryResult> 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 TokenClaimQueryResult to a ByteBuffer.
- Returns:
a buffer holding the serialized data for this instance
-
fromByteBuffer
static TokenClaimQueryResult fromByteBuffer(ByteBuffer b)
Deserializes a TokenClaimQueryResult from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class- Returns:
a TokenClaimQueryResult instance decoded from the given buffer
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static TokenClaimQueryResult.Builder newBuilder()
Creates a new TokenClaimQueryResult RecordBuilder.
- Returns:
A new TokenClaimQueryResult RecordBuilder
-
newBuilder
static TokenClaimQueryResult.Builder newBuilder(TokenClaimQueryResult.Builder other)
Creates a new TokenClaimQueryResult RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.- Returns:
A new TokenClaimQueryResult RecordBuilder
-
newBuilder
static TokenClaimQueryResult.Builder newBuilder(TokenClaimQueryResult other)
Creates a new TokenClaimQueryResult RecordBuilder by copying an existing TokenClaimQueryResult instance.
- Parameters:
other
- The existing instance to copy.- Returns:
A new TokenClaimQueryResult RecordBuilder
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
customEncode
void customEncode(Encoder out)
-
customDecode
void customDecode(ResolvingDecoder in)
-
-
-
-