org.apache.solr.update
Class SolrCoreState

java.lang.Object
  extended by org.apache.solr.update.SolrCoreState
Direct Known Subclasses:
DefaultSolrCoreState

public abstract class SolrCoreState
extends Object

The state in this class can be easily shared between SolrCores across SolrCore reloads.


Nested Class Summary
static interface SolrCoreState.IndexWriterCloser
           
 
Field Summary
protected  boolean closed
           
static org.slf4j.Logger log
           
 
Constructor Summary
SolrCoreState()
           
 
Method Summary
abstract  void cancelRecovery()
           
abstract  void close(SolrCoreState.IndexWriterCloser closer)
           
 boolean decrefSolrCoreState(SolrCoreState.IndexWriterCloser closer)
           
abstract  void doRecovery(CoreContainer cc, CoreDescriptor cd)
           
abstract  Lock getCommitLock()
           
abstract  DirectoryFactory getDirectoryFactory()
           
abstract  RefCounted<IndexWriter> getIndexWriter(SolrCore core)
          Get the current IndexWriter.
 Object getUpdateLock()
           
 void increfSolrCoreState()
           
abstract  void newIndexWriter(SolrCore core, boolean rollback, boolean forceNewDir)
          Force the creation of a new IndexWriter using the settings from the given SolrCore.
abstract  void rollbackIndexWriter(SolrCore core)
          Rollback the current IndexWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static org.slf4j.Logger log

closed

protected boolean closed
Constructor Detail

SolrCoreState

public SolrCoreState()
Method Detail

getUpdateLock

public Object getUpdateLock()

increfSolrCoreState

public void increfSolrCoreState()

decrefSolrCoreState

public boolean decrefSolrCoreState(SolrCoreState.IndexWriterCloser closer)

getCommitLock

public abstract Lock getCommitLock()

newIndexWriter

public abstract void newIndexWriter(SolrCore core,
                                    boolean rollback,
                                    boolean forceNewDir)
                             throws IOException
Force the creation of a new IndexWriter using the settings from the given SolrCore.

Parameters:
rollback - close IndexWriter if false, else rollback
Throws:
IOException - If there is a low-level I/O error.

getIndexWriter

public abstract RefCounted<IndexWriter> getIndexWriter(SolrCore core)
                                                throws IOException
Get the current IndexWriter. If a new IndexWriter must be created, use the settings from the given SolrCore.

Throws:
IOException - If there is a low-level I/O error.

rollbackIndexWriter

public abstract void rollbackIndexWriter(SolrCore core)
                                  throws IOException
Rollback the current IndexWriter. When creating the new IndexWriter use the settings from the given SolrCore.

Throws:
IOException - If there is a low-level I/O error.

getDirectoryFactory

public abstract DirectoryFactory getDirectoryFactory()
Returns:
the DirectoryFactory that should be used.

doRecovery

public abstract void doRecovery(CoreContainer cc,
                                CoreDescriptor cd)

cancelRecovery

public abstract void cancelRecovery()

close

public abstract void close(SolrCoreState.IndexWriterCloser closer)


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.