public class BootstrappingFunction extends java.lang.Object implements Function, org.apache.geode.distributed.internal.MembershipListener, DataSerializable
DataSerializable.Replaceable| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
| Constructor and Description |
|---|
BootstrappingFunction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
void |
execute(FunctionContext context)
The method which contains the logic to be executed.
|
void |
fromData(java.io.DataInput in)
Reads the state of this object as primitive data from the given
DataInput. |
java.lang.String |
getId()
Return a unique function identifier, used to register the function with
FunctionService |
int |
hashCode() |
boolean |
hasResult()
Specifies whether the function sends results while executing.
|
boolean |
isHA()
Specifies whether the function is eligible for re-execution (in case of failure).
|
void |
memberDeparted(org.apache.geode.distributed.internal.membership.InternalDistributedMember id,
boolean crashed) |
void |
memberJoined(org.apache.geode.distributed.internal.membership.InternalDistributedMember id) |
void |
memberSuspect(org.apache.geode.distributed.internal.membership.InternalDistributedMember id,
org.apache.geode.distributed.internal.membership.InternalDistributedMember whoSuspected,
java.lang.String reason) |
boolean |
optimizeForWrite()
Return true to indicate to GemFire the method requires optimization for writing the targeted
FunctionService.onRegion(org.apache.geode.cache.Region) and any associated
routing objects. |
void |
quorumLost(java.util.Set<org.apache.geode.distributed.internal.membership.InternalDistributedMember> internalDistributedMembers,
java.util.List<org.apache.geode.distributed.internal.membership.InternalDistributedMember> internalDistributedMembers2) |
void |
toData(java.io.DataOutput out)
Writes the state of this object as primitive data to the given
DataOutput. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetRequiredPermissionspublic static final java.lang.String ID
public void execute(FunctionContext context)
FunctionExecution. The context
provided to this function is the one which was built using Execution. The contexts
can be data dependent or data-independent so user should check to see if the context provided
in parameter is instance of RegionFunctionContext.public java.lang.String getId()
FunctionFunctionServicegetId in interface FunctiongetId in interface Identifiablepublic boolean hasResult()
Function
If Function.hasResult() returns false, ResultCollector.getResult() throws
FunctionException.
If Function.hasResult() returns true, ResultCollector.getResult() blocks and
waits for the result of function execution
public boolean isHA()
FunctionisHA in interface FunctionFunctionContext.isPossibleDuplicate()public boolean optimizeForWrite()
Function
Return true to indicate to GemFire the method requires optimization for writing the targeted
FunctionService.onRegion(org.apache.geode.cache.Region) and any associated
routing objects.
Returning false will optimize for read behavior on the targeted
FunctionService.onRegion(org.apache.geode.cache.Region) and any associated
routing objects.
This method is only consulted when Region passed to FunctionService#onRegion(org.apache.geode.cache.Region) is a partitioned region
optimizeForWrite in interface FunctionFunctionServicepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void memberDeparted(org.apache.geode.distributed.internal.membership.InternalDistributedMember id,
boolean crashed)
memberDeparted in interface org.apache.geode.distributed.internal.MembershipListenerpublic void memberJoined(org.apache.geode.distributed.internal.membership.InternalDistributedMember id)
memberJoined in interface org.apache.geode.distributed.internal.MembershipListenerpublic void memberSuspect(org.apache.geode.distributed.internal.membership.InternalDistributedMember id,
org.apache.geode.distributed.internal.membership.InternalDistributedMember whoSuspected,
java.lang.String reason)
memberSuspect in interface org.apache.geode.distributed.internal.MembershipListenerpublic void quorumLost(java.util.Set<org.apache.geode.distributed.internal.membership.InternalDistributedMember> internalDistributedMembers,
java.util.List<org.apache.geode.distributed.internal.membership.InternalDistributedMember> internalDistributedMembers2)
quorumLost in interface org.apache.geode.distributed.internal.MembershipListenerpublic 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 in