Class NfsMutexActor
java.lang.Object
org.tasktide.mutex.actor.InterProcessMutexActor
org.tasktide.mutex.actor.NfsMutexActor
- All Implemented Interfaces:
MutexActor
Package private implementation of the
InterProcessMutexActor for
shared file system-
Field Summary
Fields inherited from class InterProcessMutexActor
JSON, PRETTY_JSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAcquire lock for provided target filebooleanAcquire lock for providedMutexProvides the value for the activeMutexgetState()Get mutex stateGetMutexStrategybooleanrelease()Release activeMutexif presentbooleanRelease lock on target filebooleanRelease providedMutexvoidsetState(MutexState newState) SetMutexstatevoidwaitForLock(Mutex mutex) Waits for providedMutexto become the leaderMethods inherited from class InterProcessMutexActor
handleFirstInstance
-
Constructor Details
-
NfsMutexActor
public NfsMutexActor()
-
-
Method Details
-
getStrategy
-
waitForLock
Waits for providedMutexto become the leader- Parameters:
mutex-- Throws:
MutexCheckedException
-
acquire
Acquire lock for providedMutex- Parameters:
mutex-- Returns:
- boolean
- Throws:
MutexCheckedException
-
acquire
Acquire lock for provided target file- Parameters:
targetFile-- Returns:
- boolean
- Throws:
MutexCheckedException
-
release
Release lock on target file- Parameters:
targetFile-- Returns:
- boolean
- Throws:
MutexCheckedException
-
release
Release providedMutex- Parameters:
mutex-- Returns:
- boolean
- Throws:
MutexCheckedException
-
release
Release activeMutexif present- Returns:
- boolean
- Throws:
MutexCheckedException
-
getState
-
setState
-
fetchActiveFieldValue
-