Package org.terrier.structures
Class ConcurrentIndexLoader
- java.lang.Object
-
- org.terrier.structures.ConcurrentIndexLoader
-
- All Implemented Interfaces:
IndexFactory.IndexLoader
public class ConcurrentIndexLoader extends java.lang.Object implements IndexFactory.IndexLoader
An index loader for index references for indices that we wish to be thread safe
-
-
Constructor Summary
Constructors Constructor Description ConcurrentIndexLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IndexRef
getUnderlyingRef(IndexRef ref)
java.lang.Class<? extends Index>
indexImplementor(IndexRef ref)
Returns the class that will implement the Index for the passed referencestatic boolean
isConcurrent(IndexRef ref)
static boolean
isIndexConcurrent(Index index)
Index
load(IndexRef ref)
Returns the Index for this IndexRefstatic IndexRef
makeConcurrent(IndexRef ref)
boolean
supports(IndexRef ref)
Does this IndexLoader support this IndexRef
-
-
-
Method Detail
-
isIndexConcurrent
public static boolean isIndexConcurrent(Index index)
-
isConcurrent
public static boolean isConcurrent(IndexRef ref)
-
supports
public boolean supports(IndexRef ref)
Description copied from interface:IndexFactory.IndexLoader
Does this IndexLoader support this IndexRef- Specified by:
supports
in interfaceIndexFactory.IndexLoader
-
load
public Index load(IndexRef ref)
Description copied from interface:IndexFactory.IndexLoader
Returns the Index for this IndexRef- Specified by:
load
in interfaceIndexFactory.IndexLoader
-
indexImplementor
public java.lang.Class<? extends Index> indexImplementor(IndexRef ref)
Description copied from interface:IndexFactory.IndexLoader
Returns the class that will implement the Index for the passed reference- Specified by:
indexImplementor
in interfaceIndexFactory.IndexLoader
-
-