Package org.elasticsearch.env
Class ShardLock
- java.lang.Object
-
- org.elasticsearch.env.ShardLock
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public abstract class ShardLock extends Object implements Closeable
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract voidcloseInternal()ShardIdgetShardId()Returns the locks shards Id.StringtoString()
-
-
-
Constructor Detail
-
ShardLock
public ShardLock(ShardId id)
-
-
Method Detail
-
getShardId
public final ShardId getShardId()
Returns the locks shards Id.
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
closeInternal
protected abstract void closeInternal()
-
-