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
           
 
Constructor Summary
SolrCoreState()
           
 
Method Summary
abstract  void cancelRecovery()
           
abstract  void decref(SolrCoreState.IndexWriterCloser closer)
          Decrement the number of references to this state.
abstract  void doRecovery(CoreContainer cc, String name)
           
abstract  DirectoryFactory getDirectoryFactory()
           
abstract  IndexWriter getIndexWriter(SolrCore core)
          Get the current IndexWriter.
abstract  void incref()
          Increment the number of references to this state.
abstract  void newIndexWriter(SolrCore core)
          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
 

Constructor Detail

SolrCoreState

public SolrCoreState()
Method Detail

newIndexWriter

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

Parameters:
core -
Throws:
IOException

getIndexWriter

public abstract 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

decref

public abstract void decref(SolrCoreState.IndexWriterCloser closer)
                     throws IOException
Decrement the number of references to this state. When then number of references hits 0, the state will close. If an optional closer is passed, that will be used to close the writer.

Throws:
IOException

incref

public abstract void incref()
Increment the number of references to this state.


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.

Parameters:
core -
Throws:
IOException

getDirectoryFactory

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

doRecovery

public abstract void doRecovery(CoreContainer cc,
                                String name)

cancelRecovery

public abstract void cancelRecovery()


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