Class ShardLock

org.elasticsearch.env.ShardLock
All Implemented Interfaces:
,

public abstract class ShardLock extends implements
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected abstract void
     
    Returns the locks shards Id.
    void
     details)
    Update the details of the holder of this lock.
     

    Methods inherited from class java.lang.

    , , , , , , , , ,
  • Constructor Details

    • ShardLock

      public ShardLock(ShardId id)
  • Method Details

    • getShardId

      public final ShardId getShardId()
      Returns the locks shards Id.
    • close

      public final void close()
      Specified by:
       in interface 
      Specified by:
       in interface 
    • closeInternal

      protected abstract void closeInternal()
    • setDetails

      public void setDetails( details)
      Update the details of the holder of this lock. These details are displayed alongside a ShardLockObtainFailedException. Must only be called by the holder of this lock.
    • toString

      public  toString()
      Overrides:
       in class