com.atlassian.jira.issue.index
Class MockIndexDirectoryFactory

java.lang.Object
  extended by com.atlassian.jira.issue.index.MockIndexDirectoryFactory
All Implemented Interfaces:
IndexDirectoryFactory, Supplier<Map<IndexDirectoryFactory.Name,Index.Manager>>

public class MockIndexDirectoryFactory
extends Object
implements IndexDirectoryFactory


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.issue.index.IndexDirectoryFactory
IndexDirectoryFactory.IndexPathAdapter, IndexDirectoryFactory.Mode, IndexDirectoryFactory.Name
 
Constructor Summary
MockIndexDirectoryFactory(Function<IndexDirectoryFactory.Name,org.apache.lucene.store.Directory> directorySupplier)
           
 
Method Summary
 Map<IndexDirectoryFactory.Name,Index.Manager> get()
          Produce an object.
 List<String> getIndexPaths()
           
 String getIndexRootPath()
           
 void setIndexingMode(IndexDirectoryFactory.Mode mode)
          Sets the Indexing Mode - one of either DIRECT or QUEUED.
 void setIndexRootPath(String rootPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockIndexDirectoryFactory

public MockIndexDirectoryFactory(Function<IndexDirectoryFactory.Name,org.apache.lucene.store.Directory> directorySupplier)
Method Detail

get

public Map<IndexDirectoryFactory.Name,Index.Manager> get()
Description copied from interface: Supplier
Produce an object. Retrieve an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.

Specified by:
get in interface Supplier<Map<IndexDirectoryFactory.Name,Index.Manager>>
Returns:
the product, may be null if there are no objects available.

getIndexPaths

public List<String> getIndexPaths()
Specified by:
getIndexPaths in interface IndexDirectoryFactory

getIndexRootPath

public String getIndexRootPath()
Specified by:
getIndexRootPath in interface IndexDirectoryFactory

setIndexRootPath

public void setIndexRootPath(String rootPath)

setIndexingMode

public void setIndexingMode(@Nonnull
                            IndexDirectoryFactory.Mode mode)
Description copied from interface: IndexDirectoryFactory
Sets the Indexing Mode - one of either DIRECT or QUEUED.

Specified by:
setIndexingMode in interface IndexDirectoryFactory
Parameters:
mode - the indexing mode.


Copyright © 2002-2014 Atlassian. All Rights Reserved.