public class IndexTransactionTracker extends AbstractReindexComponent
Modifier and Type | Class and Description |
---|---|
static interface |
IndexTransactionTracker.IndexTransactionTrackerListener
A callback that can be set to provide logging and other record keeping
|
AbstractReindexComponent.InIndex, AbstractReindexComponent.ReindexNodeCallback, AbstractReindexComponent.ReindexTerminatedException
ftsIndexer, indexer, nodeDAO, nodeService, searcher, transactionService
Constructor and Description |
---|
IndexTransactionTracker()
Set the defaults.
|
Modifier and Type | Method and Description |
---|---|
String |
getReindexStatus() |
protected long |
getStartingTxnCommitTime()
Find a transaction time to start indexing from (inclusive).
|
protected void |
reindexImpl()
Perform the actual work.
|
protected boolean |
requireTransaction()
Determines if calls to
AbstractReindexComponent.reindexImpl() should be wrapped in a transaction or not. |
void |
resetFromTxn(long txnId) |
void |
setDisableInTransactionIndexing(boolean disableInTransactionIndexing)
Enable or disabled in-transaction indexing.
|
void |
setListener(IndexTransactionTracker.IndexTransactionTrackerListener listener) |
void |
setMaxRecordSetSize(int maxRecordSetSize)
Set the number of transactions to request per query.
|
void |
setMaxTransactionsPerLuceneCommit(int maxTransactionsPerLuceneCommit)
Set the number of transactions to process per Lucene write.
|
void |
setMaxTxnDurationMinutes(long maxTxnDurationMinutes)
Set the expected maximum duration of transaction supported.
|
void |
setNodeIndexer(NodeIndexer nodeIndexer) |
void |
setReindexLagMs(long reindexLagMs)
Transaction tracking should lag by the average commit time for a transaction.
|
doInRetryingTransaction, getIndexerWriteLock, isIgnorableStore, isShuttingDown, isTxnPresentInIndex, isTxnPresentInIndex, reindex, reindexTransaction, reindexTransaction, reindexTransactionAsynchronously, setAuthenticationComponent, setFtsIndexer, setIndexer, setNodeDAO, setNodeService, setSearcher, setShutdown, setStoreProtocolsToIgnore, setStoresToIgnore, setTenantService, setThreadPoolExecutor, setTransactionService, waitForAsynchronousReindexing
public IndexTransactionTracker()
public void setListener(IndexTransactionTracker.IndexTransactionTrackerListener listener)
public void setNodeIndexer(NodeIndexer nodeIndexer)
public void setMaxTxnDurationMinutes(long maxTxnDurationMinutes)
maxTxnDurationMinutes
- the maximum length of time a transaction will take in minutespublic void setReindexLagMs(long reindexLagMs)
reindexLagMs
- the minimum age of a transaction to be considered by
the index transaction trackingpublic void setMaxRecordSetSize(int maxRecordSetSize)
public void setMaxTransactionsPerLuceneCommit(int maxTransactionsPerLuceneCommit)
public void setDisableInTransactionIndexing(boolean disableInTransactionIndexing)
NodeIndexer
is disabled when this component initialises.protected boolean requireTransaction()
AbstractReindexComponent
AbstractReindexComponent.reindexImpl()
should be wrapped in a transaction or not.
The default is true.requireTransaction
in class AbstractReindexComponent
public void resetFromTxn(long txnId)
protected void reindexImpl()
AbstractReindexComponent
reindexImpl
in class AbstractReindexComponent
public String getReindexStatus()
protected long getStartingTxnCommitTime()
Copyright © 2005–2017 Alfresco Software. All rights reserved.