public class InternalEngine extends Engine
Engine.Create, Engine.Delete, Engine.DeleteByQuery, Engine.FailedEngineListener, Engine.Get, Engine.GetResult, Engine.Index, Engine.IndexingOperation, Engine.IndexThrottle, Engine.NoOpLock, Engine.Operation, Engine.RecoveryHandler, Engine.Searcher| Modifier and Type | Field and Description |
|---|---|
protected FlushingRecoveryCounter |
onGoingRecoveries |
deletionPolicy, engineConfig, failedEngine, failedEngineListener, failEngineLock, isClosed, logger, readLock, rwl, shardId, store, writeLock| Constructor and Description |
|---|
InternalEngine(EngineConfig engineConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateThrottling() |
protected void |
closeNoLock(String reason)
Closes the engine without acquiring the write lock.
|
void |
create(Engine.Create create) |
void |
deactivateThrottling() |
void |
delete(Engine.Delete delete) |
void |
delete(Engine.DeleteByQuery delete) |
void |
flush()
Flushes the state of the engine including the transaction log, clearing memory and persisting
documents in the lucene index to disk including a potentially heavy and durable fsync operation.
|
void |
flush(boolean force,
boolean waitIfOngoing)
Flushes the state of the engine including the transaction log, clearing memory.
|
void |
forceMerge(boolean flush,
int maxNumSegments,
boolean onlyExpungeDeletes,
boolean upgrade)
Triggers a forced merge on this engine
|
Engine.GetResult |
get(Engine.Get get) |
protected org.apache.lucene.search.SearcherManager |
getSearcherManager() |
boolean |
hasUncommittedChanges()
Returns
true the internal writer has any uncommitted changes. |
void |
index(Engine.Index index) |
protected boolean |
maybeFailEngine(String source,
Throwable t)
Check whether the engine should be failed
|
void |
maybeMerge() |
boolean |
possibleMergeNeeded()
Returns true if a possible merge is really needed.
|
void |
recover(Engine.RecoveryHandler recoveryHandler) |
void |
refresh(String source)
Refreshes the engine for new search operations to reflect the latest
changes.
|
List<Segment> |
segments()
The list of segments in the engine.
|
SnapshotIndexCommit |
snapshotIndex()
Snapshots the index and returns a handle to it.
|
protected void |
upgrade3xSegments(Store store) |
protected void |
writerSegmentStats(SegmentsStats stats) |
acquireSearcher, close, config, ensureOpen, failEngine, flushAndClose, forceMerge, getFromSearcher, getSegmentInfo, guardedRamBytesUsed, isMergedSegment, newSearcher, refreshNeeded, segmentsStats, wrapIfClosedprotected final FlushingRecoveryCounter onGoingRecoveries
public InternalEngine(EngineConfig engineConfig) throws EngineException
EngineExceptionpublic Engine.GetResult get(Engine.Get get) throws EngineException
get in class EngineEngineExceptionpublic void create(Engine.Create create) throws EngineException
create in class EngineEngineExceptionpublic void index(Engine.Index index) throws EngineException
index in class EngineEngineExceptionpublic void delete(Engine.Delete delete) throws EngineException
delete in class EngineEngineExceptionpublic void delete(Engine.DeleteByQuery delete) throws EngineException
delete in class EngineEngineExceptionpublic void refresh(String source) throws EngineException
Enginerefresh in class EngineEngineExceptionpublic void flush()
throws EngineException
Engineflush in class EngineEngineExceptionpublic void flush(boolean force,
boolean waitIfOngoing)
throws EngineException
Engineflush in class Engineforce - if true a lucene commit is executed even if no changes need to be committed.waitIfOngoing - if true this call will block until all currently running flushes have finished.
Otherwise this call will return without blocking.EngineExceptionpublic boolean possibleMergeNeeded()
EnginepossibleMergeNeeded in class Enginepublic void maybeMerge()
throws EngineException
maybeMerge in class EngineEngineExceptionpublic void forceMerge(boolean flush,
int maxNumSegments,
boolean onlyExpungeDeletes,
boolean upgrade)
throws EngineException
EngineforceMerge in class EngineEngineExceptionpublic SnapshotIndexCommit snapshotIndex() throws EngineException
EnginesnapshotIndex in class EngineEngineExceptionpublic void recover(Engine.RecoveryHandler recoveryHandler) throws EngineException
recover in class EngineEngineExceptionprotected boolean maybeFailEngine(String source, Throwable t)
EnginemaybeFailEngine in class Engineprotected final void writerSegmentStats(SegmentsStats stats)
writerSegmentStats in class Enginepublic List<Segment> segments()
Engineprotected final void closeNoLock(String reason) throws ElasticsearchException
closeNoLock in class EngineElasticsearchExceptionpublic boolean hasUncommittedChanges()
Enginetrue the internal writer has any uncommitted changes. Otherwise falsehasUncommittedChanges in class Engineprotected org.apache.lucene.search.SearcherManager getSearcherManager()
getSearcherManager in class Engineprotected void upgrade3xSegments(Store store) throws IOException
IOExceptionpublic void activateThrottling()
public void deactivateThrottling()
Copyright © 2009–2015. All rights reserved.