Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.lucene
Class ChunkCacheKey

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

public final class ChunkCacheKey
extends Object
implements Serializable, IndexScopedKey

Used as a key to distinguish file chunk in cache.

Since:
4.0
Author:
Lukasz Moren, Sanne Grinovero
See Also:
Serialized Form

Nested Class Summary
static class ChunkCacheKey.Externalizer
           
 
Constructor Summary
ChunkCacheKey(String indexName, String fileName, int chunkId, int bufferSize)
           
 
Method Summary
 Object accept(KeyVisitor visitor)
           
 boolean equals(Object obj)
           
 int getBufferSize()
          Get the bufferSize.
 int getChunkId()
          Get the chunkId.
 String getFileName()
          Get the fileName.
 String getIndexName()
          Get the indexName.
 int hashCode()
           
 String toString()
          Changing the encoding could break backwards compatibility
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChunkCacheKey

public ChunkCacheKey(String indexName,
                     String fileName,
                     int chunkId,
                     int bufferSize)
Method Detail

getChunkId

public int getChunkId()
Get the chunkId.

Returns:
the chunkId.

getBufferSize

public int getBufferSize()
Get the bufferSize.

Returns:
the bufferSize.

getIndexName

public String getIndexName()
Get the indexName.

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

accept

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

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()
Changing the encoding could break backwards compatibility

Overrides:
toString in class Object
See Also:
LuceneKey2StringMapper.getKeyMapping(String)

Infinispan Distribution 5.2.6.Final-redhat-2

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