Class MembershipPackage
-
- 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 MembershipPackage extends SpecificRecordBase implements SpecificRecord
Membership data package which will be distributed on the wire across members.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
MembershipPackage.Builder
RecordBuilder for MembershipPackage instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public DistributionType
distributionType
public int
currentPage
public int
pageCount
public DistributionMetaData
distributionMetaData
public SignedMemberships
memberships
public SignedGroupParameters
groupParameters
-
Constructor Summary
Constructors Constructor Description MembershipPackage()
Default constructor. MembershipPackage(DistributionType distributionType, Integer currentPage, Integer pageCount, DistributionMetaData distributionMetaData, SignedMemberships memberships, SignedGroupParameters groupParameters)
All-args constructor.
-
Method Summary
Modifier and Type Method Description DistributionType
getDistributionType()
Gets the value of the 'distributionType' field. void
setDistributionType(DistributionType value)
Sets the value of the 'distributionType' field. int
getCurrentPage()
Gets the value of the 'currentPage' field. void
setCurrentPage(int value)
Sets the value of the 'currentPage' field. int
getPageCount()
Gets the value of the 'pageCount' field. void
setPageCount(int value)
Sets the value of the 'pageCount' field. DistributionMetaData
getDistributionMetaData()
Gets the value of the 'distributionMetaData' field. void
setDistributionMetaData(DistributionMetaData value)
Sets the value of the 'distributionMetaData' field. SignedMemberships
getMemberships()
Gets the value of the 'memberships' field. void
setMemberships(SignedMemberships value)
Sets the value of the 'memberships' field. SignedGroupParameters
getGroupParameters()
Gets the value of the 'groupParameters' field. void
setGroupParameters(SignedGroupParameters value)
Sets the value of the 'groupParameters' field. static Schema
getClassSchema()
static BinaryMessageEncoder<MembershipPackage>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<MembershipPackage>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<MembershipPackage>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this MembershipPackage to a ByteBuffer. static MembershipPackage
fromByteBuffer(ByteBuffer b)
Deserializes a MembershipPackage from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static MembershipPackage.Builder
newBuilder()
Creates a new MembershipPackage RecordBuilder. static MembershipPackage.Builder
newBuilder(MembershipPackage.Builder other)
Creates a new MembershipPackage RecordBuilder by copying an existing Builder. static MembershipPackage.Builder
newBuilder(MembershipPackage other)
Creates a new MembershipPackage RecordBuilder by copying an existing MembershipPackage instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, 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
-
MembershipPackage
MembershipPackage()
Default constructor.
-
MembershipPackage
MembershipPackage(DistributionType distributionType, Integer currentPage, Integer pageCount, DistributionMetaData distributionMetaData, SignedMemberships memberships, SignedGroupParameters groupParameters)
All-args constructor.- Parameters:
distributionType
- Distribution type for this data package.currentPage
- Placeholder for the current page we are processing.pageCount
- The total number of pages in the given update.distributionMetaData
- Basic information about the data distribution, can also be a response to a sync.memberships
- Membership updates.groupParameters
- GroupParameters updates.
-
-
Method Detail
-
getDistributionType
DistributionType getDistributionType()
Gets the value of the 'distributionType' field.
-
setDistributionType
void setDistributionType(DistributionType value)
Sets the value of the 'distributionType' field. Distribution type for this data package. Could be a standard MGM update, or a response to a requested synchronisation.
- Parameters:
value
- the value to set.
-
getCurrentPage
int getCurrentPage()
Gets the value of the 'currentPage' field.
-
setCurrentPage
void setCurrentPage(int value)
Sets the value of the 'currentPage' field. Placeholder for the current page we are processing.
- Parameters:
value
- the value to set.
-
getPageCount
int getPageCount()
Gets the value of the 'pageCount' field.
-
setPageCount
void setPageCount(int value)
Sets the value of the 'pageCount' field. The total number of pages in the given update.
- Parameters:
value
- the value to set.
-
getDistributionMetaData
DistributionMetaData getDistributionMetaData()
Gets the value of the 'distributionMetaData' field.
-
setDistributionMetaData
void setDistributionMetaData(DistributionMetaData value)
Sets the value of the 'distributionMetaData' field. Basic information about the data distribution, can also be a response to a sync.
- Parameters:
value
- the value to set.
-
getMemberships
SignedMemberships getMemberships()
Gets the value of the 'memberships' field.
-
setMemberships
void setMemberships(SignedMemberships value)
Sets the value of the 'memberships' field. Membership updates.
- Parameters:
value
- the value to set.
-
getGroupParameters
SignedGroupParameters getGroupParameters()
Gets the value of the 'groupParameters' field.
-
setGroupParameters
void setGroupParameters(SignedGroupParameters value)
Sets the value of the 'groupParameters' field. GroupParameters updates.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<MembershipPackage> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<MembershipPackage> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<MembershipPackage> 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
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this MembershipPackage to a ByteBuffer.
-
fromByteBuffer
static MembershipPackage fromByteBuffer(ByteBuffer b)
Deserializes a MembershipPackage from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static MembershipPackage.Builder newBuilder()
Creates a new MembershipPackage RecordBuilder.
-
newBuilder
static MembershipPackage.Builder newBuilder(MembershipPackage.Builder other)
Creates a new MembershipPackage RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static MembershipPackage.Builder newBuilder(MembershipPackage other)
Creates a new MembershipPackage RecordBuilder by copying an existing MembershipPackage instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-