public class RecoveryLockFile extends Object implements TransactionRecoveryFence, DelegatedTransactionRecoveryFence
in the recovery lock file have the following format:
PREFIX INSTANCE_NAME TIMESTAMP
Where PREFIX can be one of:
- "O" means OWNED by this instance, i.e. non-delegated recovery
- "B" means recovered BY the specified instance
- "F" means recovered FOR the specified instance
TIMESTAMP is the time of the recovery operation| Modifier and Type | Method and Description |
|---|---|
static DelegatedTransactionRecoveryFence |
getDelegatedTransactionRecoveryFence(GMSCallBack gmsCallBack) |
String |
getInstanceRecoveredFor(String path,
long timestamp)
Returns instance for which delegated recovery was done before the timestamp specified
on the specified path or null if such instance does not exist
|
boolean |
isFenceRaised(String logDir,
String instance,
long timestamp)
Returns true if the specified instance on the specified path is being recovered
after the specified timestamp
|
void |
lowerFence()
Lower the fence
|
void |
lowerFence(String logPath,
String instance)
Lower the fence for the specified instance on the specified path
|
void |
raiseFence()
Raise the fence so that no other instance can
start the recovery at the same time.
|
void |
raiseFence(String logPath,
String instance)
Raise the fence for the specified instance on the specified path so that no other instance can
start delegated recovery at the same time.
|
void |
raiseFence(String logPath,
String instance,
long timestamp) |
void |
start()
DataStructures are initialized first.
|
void |
transferRecoveryTo(String logDir,
String instance)
If an instance was doing delegated recovery on the specified path, assign
specified instance instead.
|
public static DelegatedTransactionRecoveryFence getDelegatedTransactionRecoveryFence(GMSCallBack gmsCallBack)
public void start()
TransactionRecoveryFencestart in interface TransactionRecoveryFencepublic void raiseFence()
raiseFence in interface TransactionRecoveryFencepublic void lowerFence()
lowerFence in interface TransactionRecoveryFencepublic boolean isFenceRaised(String logDir, String instance, long timestamp)
isFenceRaised in interface DelegatedTransactionRecoveryFencepublic void raiseFence(String logPath, String instance)
raiseFence in interface DelegatedTransactionRecoveryFencepublic void lowerFence(String logPath, String instance)
lowerFence in interface DelegatedTransactionRecoveryFencepublic String getInstanceRecoveredFor(String path, long timestamp)
getInstanceRecoveredFor in interface DelegatedTransactionRecoveryFencepublic void transferRecoveryTo(String logDir, String instance)
transferRecoveryTo in interface DelegatedTransactionRecoveryFenceCopyright © 2017. All rights reserved.