|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.cache.MembershipAttributes
public class MembershipAttributes
Configuration attributes for defining reliability requirements and behavior
for a 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.gemstone.gemfire.DataSerializable |
|---|
DataSerializable.Replaceable |
| Constructor Summary | |
|---|---|
MembershipAttributes()
Creates a new MembershipAttributes with the default
configuration of no required roles. |
|
MembershipAttributes(String[] requiredRoles)
Creates a new MembershipAttributes with the specified
required role names. |
|
MembershipAttributes(String[] requiredRoles,
LossAction lossAction,
ResumptionAction resumptionAction)
Creates a new MembershipAttributes with the specified
required role names, reliability policy, and resumption action. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one. |
void |
fromData(DataInput in)
Reads the state of this object as primitive data from the given DataInput. |
LossAction |
getLossAction()
Returns the reliability policy that describes behavior if any required roles are missing. |
Set<Role> |
getRequiredRoles()
Returns the set of Roles that are required for the reliability of this region. |
ResumptionAction |
getResumptionAction()
Returns the resumption action that describes behavior when |
int |
hashCode()
Returns a hash code for the object. |
boolean |
hasRequiredRoles()
Returns true if there are one or more required roles specified. |
void |
readExternal(ObjectInput in)
|
void |
toData(DataOutput out)
Writes the state of this object as primitive data to the given DataOutput. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MembershipAttributes()
MembershipAttributes with the default
configuration of no required roles.
public MembershipAttributes(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 region
IllegalArgumentException - if no requiredRoles are specified
public MembershipAttributes(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 system
IllegalArgumentException - if the resumptionAction is incompatible with the lossAction
or if no requiredRoles are specified| Method Detail |
|---|
public Set<Role> getRequiredRoles()
public boolean hasRequiredRoles()
public LossAction getLossAction()
public ResumptionAction getResumptionAction()
public boolean equals(Object other)
equals in class Objectother - the reference object with which to compare.
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
public void toData(DataOutput out)
throws 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 DataSerializableIOException - A problem occurs while writing to out
public void fromData(DataInput in)
throws IOException,
ClassNotFoundException
DataSerializableDataInput.
fromData in interface DataSerializableIOException - A problem occurs while reading from in
ClassNotFoundException - A class could not be loaded while reading from
in
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||