Specific to recovery related signal. This Signal type will only be
delivered to the corresponding Action (i.e. an Action of the
FailureRecoveryAction type) on only one of the servers.
In other words, automatic recovery services which wish only one
server to perform the recovery, should register an ActionFactory
which produces only FailureRecoveryAction on all participating GMS
instances. The registration code is identical in all servers.
For any given failure, which one of the servers will be selected to
receive a FailureRecoverySignal is unique and depends on a function
defined on the consistent membership view provided by the underlying
group infrastructure.
This Signal's acquire() and release() methods (defined in the parent
interface Signal) have special meaning and
must be called
by the client before and after, respectively, performing any recovery
operations.
The
acquire()
method does the following:
Enables the caller to raise a logical fence on a specified target member
token's component.
Failure Fencing is a group-wide protocol that, on one hand, requires
members to update a shared/distributed datastructure if any of their
components need to perform operations on another members' corresponding
component. On the other hand, the group-wide protocol requires members
to observe "Netiquette" during their startup so as to check if any of
their components are being operated upon by other group members.
Typically this check is performed by the respective components
themselves. See the GroupHandle.isFenced()
method for
this check.
When the operation is completed by the remote member component, it
removes the entry from the shared datastructure by calling release()
method.
Raising the fence, places an entry into the
DistributedStateCache
that is accessed by other members during
their startup to check for any fence.
The release() method does the following :
Enables the caller to lower the logical fence that was earlier raised on
a target member component. This is done when the recovery operation being
performed on the target member component has now completed.