org.apache.solr.update
Class UpdateLog
java.lang.Object
org.apache.solr.update.UpdateLog
- All Implemented Interfaces:
- PluginInfoInitialized
public class UpdateLog
- extends Object
- implements PluginInfoInitialized
- WARNING: This API is experimental and might change in incompatible ways in the next release.
LOG_FILENAME_PATTERN
public static String LOG_FILENAME_PATTERN
TLOG_NAME
public static String TLOG_NAME
log
public static org.slf4j.Logger log
debug
public boolean debug
trace
public boolean trace
ADD
public static final int ADD
- See Also:
- Constant Field Values
DELETE
public static final int DELETE
- See Also:
- Constant Field Values
DELETE_BY_QUERY
public static final int DELETE_BY_QUERY
- See Also:
- Constant Field Values
COMMIT
public static final int COMMIT
- See Also:
- Constant Field Values
FLAG_GAP
public static final int FLAG_GAP
- See Also:
- Constant Field Values
OPERATION_MASK
public static final int OPERATION_MASK
- See Also:
- Constant Field Values
numRecordsToKeep
public final int numRecordsToKeep
- See Also:
- Constant Field Values
testing_logReplayHook
public static Runnable testing_logReplayHook
testing_logReplayFinishHook
public static Runnable testing_logReplayFinishHook
UpdateLog
public UpdateLog()
getVersionInfo
public VersionInfo getVersionInfo()
init
public void init(PluginInfo info)
- Specified by:
init
in interface PluginInfoInitialized
init
public void init(UpdateHandler uhandler,
SolrCore core)
getLogDir
public File getLogDir()
getStartingVersions
public List<Long> getStartingVersions()
getStartingOperation
public int getStartingOperation()
getLogList
public static String[] getLogList(File directory)
getLastLogId
public long getLastLogId()
add
public void add(AddUpdateCommand cmd)
add
public void add(AddUpdateCommand cmd,
boolean clearCaches)
delete
public void delete(DeleteUpdateCommand cmd)
deleteByQuery
public void deleteByQuery(DeleteUpdateCommand cmd)
deleteAll
public void deleteAll()
- currently for testing only
getDBQNewer
public List<UpdateLog.DBQ> getDBQNewer(long version)
hasUncommittedChanges
public boolean hasUncommittedChanges()
preCommit
public void preCommit(CommitUpdateCommand cmd)
postCommit
public void postCommit(CommitUpdateCommand cmd)
preSoftCommit
public void preSoftCommit(CommitUpdateCommand cmd)
postSoftCommit
public void postSoftCommit(CommitUpdateCommand cmd)
lookup
public Object lookup(BytesRef indexedId)
lookupVersion
public Long lookupVersion(BytesRef indexedId)
finish
public void finish(UpdateLog.SyncLevel syncLevel)
recoverFromLog
public Future<UpdateLog.RecoveryInfo> recoverFromLog()
close
public void close(boolean committed)
close
public void close(boolean committed,
boolean deleteOnClose)
getRecentUpdates
public UpdateLog.RecentUpdates getRecentUpdates()
bufferUpdates
public void bufferUpdates()
dropBufferedUpdates
public boolean dropBufferedUpdates()
- Returns true if we were able to drop buffered updates and return to the ACTIVE state
applyBufferedUpdates
public Future<UpdateLog.RecoveryInfo> applyBufferedUpdates()
- Returns the Future to wait on, or null if no replay was needed
getState
public UpdateLog.State getState()
toString
public String toString()
- Overrides:
toString
in class Object
cancelApplyBufferedUpdates
public void cancelApplyBufferedUpdates()
deleteFile
public static void deleteFile(File file)
getTlogDir
public static File getTlogDir(SolrCore core,
PluginInfo info)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.