Class MembershipAttributes
- All Implemented Interfaces:
Externalizable,Serializable,DataSerializable
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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable
DataSerializable.Replaceable -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a newMembershipAttributeswith the default configuration of no required roles.MembershipAttributes(String[] requiredRoles) Deprecated.Creates a newMembershipAttributeswith the specified required role names.MembershipAttributes(String[] requiredRoles, LossAction lossAction, ResumptionAction resumptionAction) Deprecated.Creates a newMembershipAttributeswith the specified required role names, reliability policy, and resumption action. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Indicates whether some other object is "equal to" this one.voidDeprecated.Reads the state of this object as primitive data from the givenDataInput.Deprecated.Returns the reliability policy that describes behavior if any required roles are missing.Deprecated.Returns the set of Roles that are required for the reliability of this region.Deprecated.Returns the resumption action that describes behavior when missing required roles return to the systeminthashCode()Deprecated.Returns a hash code for the object.booleanDeprecated.Returns true if there are one or more required roles specified.voidDeprecated.voidtoData(DataOutput out) Deprecated.Writes the state of this object as primitive data to the givenDataOutput.toString()Deprecated.Returns a string representation of the object.voidDeprecated.
-
Constructor Details
-
MembershipAttributes
public MembershipAttributes()Deprecated.Creates a newMembershipAttributeswith the default configuration of no required roles. -
MembershipAttributes
Deprecated.Creates a newMembershipAttributeswith the specified required role names. Reliability policy will default to NO_ACCESS, and resumption action will default to REINITIALIZE.- Parameters:
requiredRoles- array of role names required by this process for reliable access to the region- Throws:
IllegalArgumentException- if no requiredRoles are specified
-
MembershipAttributes
public MembershipAttributes(String[] requiredRoles, LossAction lossAction, ResumptionAction resumptionAction) Deprecated.Creates a newMembershipAttributeswith the specified required role names, reliability policy, and resumption action.- Parameters:
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- Throws:
IllegalArgumentException- if the resumptionAction is incompatible with the lossAction or if no requiredRoles are specified
-
-
Method Details
-
getRequiredRoles
Deprecated.Returns the set of Roles that are required for the reliability of this region.- Returns:
- the set of Roles that are required for the reliability of this region
-
hasRequiredRoles
public boolean hasRequiredRoles()Deprecated.Returns true if there are one or more required roles specified.- Returns:
- whether there are one or more required roles specified
-
getLossAction
Deprecated.Returns the reliability policy that describes behavior if any required roles are missing.- Returns:
- the reliability policy that describes behavior if any required roles are missing
-
getResumptionAction
Deprecated.Returns the resumption action that describes behavior when missing required roles return to the system- Returns:
- the resumption action that describes behavior when missing required roles return to the system
-
equals
Deprecated.Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Deprecated.Returns a hash code for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable. -
toString
Deprecated.Returns a string representation of the object. -
toData
Deprecated.Description copied from interface:DataSerializableWrites the state of this object as primitive data to the givenDataOutput.Since 5.7 it is possible for any method call to the specified
DataOutputto throwGemFireRethrowable. It should not be caught by user code. If it is it must be rethrown.- Specified by:
toDatain interfaceDataSerializable- Parameters:
out- theDataOutputto write to- Throws:
IOException- A problem occurs while writing toout
-
fromData
Deprecated.Description copied from interface:DataSerializableReads the state of this object as primitive data from the givenDataInput.- Specified by:
fromDatain interfaceDataSerializable- Parameters:
in- theDataInputto read from- Throws:
IOException- A problem occurs while reading frominClassNotFoundException- A class could not be loaded while reading fromin
-
writeExternal
Deprecated.- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
Deprecated.- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-