Package org.infinispan.lucene
Class ChunkCacheKey
- java.lang.Object
- 
- org.infinispan.lucene.ChunkCacheKey
 
- 
- All Implemented Interfaces:
- AffinityTaggedKey,- IndexScopedKey
 
 public final class ChunkCacheKey extends Object implements IndexScopedKey Used as a key to distinguish file chunk in cache.- Since:
- 4.0
- Author:
- Lukasz Moren, Sanne Grinovero
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classChunkCacheKey.Externalizer
 - 
Constructor SummaryConstructors Constructor Description ChunkCacheKey(String indexName, String fileName, int chunkId, int bufferSize, int affinitySegmentId)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectaccept(KeyVisitor visitor)booleanequals(Object obj)intgetAffinitySegmentId()This numeric id is used exclusively for storage affinity in Infinispan.intgetBufferSize()Get the bufferSize.intgetChunkId()Get the chunkId.StringgetFileName()Get the fileName.StringgetIndexName()Get the indexName.inthashCode()StringtoString()Changing the encoding could break backwards compatibility
 
- 
- 
- 
Method Detail- 
getChunkIdpublic int getChunkId() Get the chunkId.- Returns:
- the chunkId.
 
 - 
getBufferSizepublic int getBufferSize() Get the bufferSize.- Returns:
- the bufferSize.
 
 - 
getIndexNamepublic String getIndexName() Get the indexName.- Specified by:
- getIndexNamein interface- IndexScopedKey
- Returns:
- the indexName.
 
 - 
getAffinitySegmentIdpublic int getAffinitySegmentId() Description copied from interface:IndexScopedKeyThis numeric id is used exclusively for storage affinity in Infinispan. It is not included in the equals and hashcode implementations!- Specified by:
- getAffinitySegmentIdin interface- AffinityTaggedKey
- Specified by:
- getAffinitySegmentIdin interface- IndexScopedKey
- Returns:
- the segment id as defined in BuildContext.affinityLocationIntoSegment(int), or -1 when not explicitly set.
 
 - 
acceptpublic Object accept(KeyVisitor visitor) throws Exception - Specified by:
- acceptin interface- IndexScopedKey
- Throws:
- Exception
 
 - 
getFileNamepublic String getFileName() Get the fileName.- Returns:
- the fileName.
 
 - 
toStringpublic String toString() Changing the encoding could break backwards compatibility- Overrides:
- toStringin class- Object
- See Also:
- LuceneKey2StringMapper.getKeyMapping(String)
 
 
- 
 
-