public class MembershipAttributes extends java.lang.Object implements DataSerializable, java.io.Externalizable
Region.
MembershipAttributes provides options for configuring a
Region to require one or more membership roles to be present
in the system for reliable access to the Region. Each
Role is a user defined string name, such as Producer or Backup or
FooProducer.
The LossAction defines the behavior when one or
more required roles are missing.
The ResumptionAction specifies the action to be taken when
reliability resumes.
MembershipAttributes have no effect unless one or more
required roles are specified. These attributes are immutable after the
Region has been created.
DataSerializable.Replaceable| Constructor and Description |
|---|
MembershipAttributes()
Deprecated.
Creates a new
MembershipAttributes with the default
configuration of no required roles. |
MembershipAttributes(java.lang.String[] requiredRoles)
Deprecated.
Creates a new
MembershipAttributes with the specified
required role names. |
MembershipAttributes(java.lang.String[] requiredRoles,
LossAction lossAction,
ResumptionAction resumptionAction)
Deprecated.
Creates a new
MembershipAttributes with the specified
required role names, reliability policy, and resumption action. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Deprecated.
Indicates whether some other object is "equal to" this one.
|
void |
fromData(java.io.DataInput in)
Deprecated.
Reads the state of this object as primitive data from the given
DataInput. |
LossAction |
getLossAction()
Deprecated.
Returns the reliability policy that describes behavior if any required
roles are missing.
|
java.util.Set<Role> |
getRequiredRoles()
Deprecated.
Returns the set of Roles that are required for the reliability of this region.
|
ResumptionAction |
getResumptionAction()
Deprecated.
Returns the resumption action that describes behavior when
|
int |
hashCode()
Deprecated.
Returns a hash code for the object.
|
boolean |
hasRequiredRoles()
Deprecated.
Returns true if there are one or more required roles specified.
|
void |
readExternal(java.io.ObjectInput in)
Deprecated.
|
void |
toData(java.io.DataOutput out)
Deprecated.
Writes the state of this object as primitive data to the given
DataOutput. |
java.lang.String |
toString()
Deprecated.
Returns a string representation of the object.
|
void |
writeExternal(java.io.ObjectOutput out)
Deprecated.
|
public MembershipAttributes()
MembershipAttributes with the default
configuration of no required roles.public MembershipAttributes(java.lang.String[] requiredRoles)
MembershipAttributes with the specified
required role names. Reliability policy will default to NO_ACCESS, and resumption action will
default to REINITIALIZE.requiredRoles - array of role names required by this process for reliable access to
the regionjava.lang.IllegalArgumentException - if no requiredRoles are specifiedpublic MembershipAttributes(java.lang.String[] requiredRoles,
LossAction lossAction,
ResumptionAction resumptionAction)
MembershipAttributes with the specified
required role names, reliability policy, and resumption action.requiredRoles - array of role names required by this process for reliable access to
the regionlossAction - the configuration defining how this process behaves when there are
missing required rolesresumptionAction - the action to take when missing required roles return to the systemjava.lang.IllegalArgumentException - if the resumptionAction is incompatible with the lossAction
or if no requiredRoles are specifiedpublic java.util.Set<Role> getRequiredRoles()
public boolean hasRequiredRoles()
public LossAction getLossAction()
public ResumptionAction getResumptionAction()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the reference object with which to compare.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void toData(java.io.DataOutput out)
throws java.io.IOException
DataSerializableDataOutput.
Since 5.7 it is possible for any method call to the specified
DataOutput to throw GemFireRethrowable.
It should not be caught by user code.
If it is it must be rethrown.
toData in interface DataSerializablejava.io.IOException - A problem occurs while writing to outpublic void fromData(java.io.DataInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
DataSerializableDataInput.fromData in interface DataSerializablejava.io.IOException - A problem occurs while reading from injava.lang.ClassNotFoundException - A class could not be loaded while reading from
inpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException