Package org.elasticsearch.env
Class ShardLock
java.lang.Object
org.elasticsearch.env.ShardLock
- All Implemented Interfaces:
Closeable
,AutoCloseable
A shard lock guarantees exclusive access to a shards data
directory. Internal processes should acquire a lock on a shard
before executing any write operations on the shards data directory.
- See Also:
NodeEnvironment
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected abstract void
Returns the locks shards Id.void
setDetails(String details)
Update the details of the holder of this lock.toString()
-
Constructor Details
-
ShardLock
-
-
Method Details
-
getShardId
Returns the locks shards Id. -
close
public final void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
closeInternal
protected abstract void closeInternal() -
setDetails
Update the details of the holder of this lock. These details are displayed alongside aShardLockObtainFailedException
. Must only be called by the holder of this lock. -
toString
-