Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.lucene
Class FileReadLockKey

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

public final class FileReadLockKey
extends Object
implements Serializable, IndexScopedKey

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
 Object accept(KeyVisitor visitor)
           
 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.

Specified by:
getIndexName in interface IndexScopedKey
Returns:
the indexName.

getFileName

public String getFileName()
Get the fileName.

Returns:
the fileName.

accept

public Object accept(KeyVisitor visitor)
              throws Exception
Specified by:
accept in interface IndexScopedKey
Throws:
Exception

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

Infinispan Distribution 5.2.6.Final-redhat-2

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