Package org.infinispan.lucene
Class FileCacheKey
- java.lang.Object
-
- org.infinispan.lucene.FileCacheKey
-
- All Implemented Interfaces:
AffinityTaggedKey
,IndexScopedKey
public final class FileCacheKey extends Object implements IndexScopedKey
Used as a key for file headers in a cache- Since:
- 4.0
- Author:
- Lukasz Moren, Sanne Grinovero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileCacheKey.Externalizer
-
Constructor Summary
Constructors Constructor Description FileCacheKey(String indexName, String fileName, int affinitySegmentId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accept(KeyVisitor visitor)
boolean
equals(Object obj)
int
getAffinitySegmentId()
This numeric id is used exclusively for storage affinity in Infinispan.String
getFileName()
Get the fileName.String
getIndexName()
Get the indexName.int
hashCode()
String
toString()
Changing the encoding could break backwards compatibility
-
-
-
Method Detail
-
getIndexName
public String getIndexName()
Get the indexName.- Specified by:
getIndexName
in interfaceIndexScopedKey
- Returns:
- the indexName.
-
getAffinitySegmentId
public int getAffinitySegmentId()
Description copied from interface:IndexScopedKey
This numeric id is used exclusively for storage affinity in Infinispan. It is not included in the equals and hashcode implementations!- Specified by:
getAffinitySegmentId
in interfaceAffinityTaggedKey
- Specified by:
getAffinitySegmentId
in interfaceIndexScopedKey
- Returns:
- the segment id as defined in
BuildContext.affinityLocationIntoSegment(int)
, or -1 when not explicitly set.
-
accept
public Object accept(KeyVisitor visitor) throws Exception
- Specified by:
accept
in interfaceIndexScopedKey
- Throws:
Exception
-
getFileName
public String getFileName()
Get the fileName.- Returns:
- the fileName.
-
toString
public String toString()
Changing the encoding could break backwards compatibility- Overrides:
toString
in classObject
- See Also:
LuceneKey2StringMapper.getKeyMapping(String)
-
-