org.infinispan.lucene
Class FileReadLockKey

java.lang.Object
  extended by org.infinispan.lucene.FileReadLockKey
All Implemented Interfaces:
Serializable

public final class FileReadLockKey
extends Object
implements Serializable

Lucene's index segment files are chunked, for safe deletion of elements a read lock is implemented so that all chunks are deleted only after the usage counter is decremented to zero. FileReadLockKey is used as a key for the reference counters; a special purpose key was needed to make atomic operation possible.

Since:
4.0
Author:
Sanne Grinovero
See Also:
Serialized Form

Nested Class Summary
static class FileReadLockKey.Externalizer
           
 
Constructor Summary
FileReadLockKey(String indexName, String fileName)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getFileName()
          Get the fileName.
 String getIndexName()
          Get the indexName.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileReadLockKey

public FileReadLockKey(String indexName,
                       String fileName)
Method Detail

getIndexName

public String getIndexName()
Get the indexName.

Returns:
the indexName.

getFileName

public String getFileName()
Get the fileName.

Returns:
the fileName.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.