public final class PartitionReplica extends Object implements IdentifiedDataSerializable
A PartitionReplica is identical to a Member
which has the same address
and uuid
.
Existing Member
interface could be used instead of introducing
PartitionReplica class but Member
has many additional attributes
and functionality which adds complexity to maintenance of partition table.
InternalPartition
,
Member
Modifier and Type | Field and Description |
---|---|
static String |
UNKNOWN_UID |
Constructor and Description |
---|
PartitionReplica() |
PartitionReplica(Address address,
String uuid) |
Modifier and Type | Method and Description |
---|---|
Address |
address() |
boolean |
equals(Object o) |
static PartitionReplica |
from(Member member) |
static PartitionReplica[] |
from(Member[] members) |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
int |
hashCode() |
boolean |
isIdentical(Member member) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
String |
uuid() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final String UNKNOWN_UID
public Address address()
public String uuid()
public boolean isIdentical(Member member)
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public static PartitionReplica from(Member member)
public static PartitionReplica[] from(Member[] members)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.