Class IndexFactory


  • public class IndexFactory
    extends java.lang.Object
    This is the main developer API for loading an index. You pass an IndexRef to the of() static method, and are return the corresponding Index, if any can be found. Different indices are supported: an IndexOnDisk, as well as memory indices. An IndexRef can also target a remote REST server, but no Index can be loaded for such an IndexRef. IndexFactory.IndexLoaders are used to load indices; They are found using service discovery.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.ClassLoader cl  
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isLoaded​(IndexRef ref)
      Is this index already loaded?
      static boolean isLocal​(IndexRef ref)
      Is this a local index, or a remote one?
      static Index of​(java.lang.String indexRefString)
      Shortcut method to avoid instantiating an IndexRef
      static Index of​(IndexRef ref)
      Load the index for the specified reference.
      static java.lang.Class<? extends Index> whoSupports​(IndexRef ref)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cl

        public static java.lang.ClassLoader cl
    • Constructor Detail

      • IndexFactory

        public IndexFactory()
    • Method Detail

      • isLoaded

        public static boolean isLoaded​(IndexRef ref)
        Is this index already loaded?
      • isLocal

        public static boolean isLocal​(IndexRef ref)
        Is this a local index, or a remote one?
      • whoSupports

        public static java.lang.Class<? extends Index> whoSupports​(IndexRef ref)
      • of

        public static Index of​(java.lang.String indexRefString)
        Shortcut method to avoid instantiating an IndexRef
      • of

        public static Index of​(IndexRef ref)
        Load the index for the specified reference.