public class InternalEngine extends Engine
Engine.CommitId, Engine.Create, Engine.Delete, Engine.DeleteByQuery, Engine.FailedEngineListener, Engine.Get, Engine.GetResult, Engine.Index, Engine.IndexingOperation, Engine.IndexThrottle, Engine.NoOpLock, Engine.Operation, Engine.Searcher, Engine.SyncedFlushResultdeletionPolicy, engineConfig, failedEngine, failedEngineListener, failEngineLock, isClosed, logger, readLock, rwl, shardId, store, SYNC_COMMIT_ID, writeLock| コンストラクタと説明 |
|---|
InternalEngine(EngineConfig engineConfig,
boolean skipInitialTranslogRecovery) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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)
非推奨です。
This was removed, but we keep this API so translog can replay any DBQs on upgrade.
|
Engine.CommitId |
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.
|
Engine.CommitId |
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,
boolean upgradeOnlyAncientSegments)
Triggers a forced merge on this engine
|
Engine.GetResult |
get(Engine.Get get) |
protected org.apache.lucene.index.SegmentInfos |
getLastCommittedSegmentInfos() |
MergeStats |
getMergeStats() |
protected org.apache.lucene.search.SearcherManager |
getSearcherManager() |
Translog |
getTranslog()
returns the translog for this engine
|
boolean |
hasUncommittedChanges()
Returns
true the internal writer has any uncommitted changes. |
boolean |
index(Engine.Index index) |
long |
indexWriterRAMBytesUsed()
How much heap Lucene's IndexWriter is using
|
protected boolean |
maybeFailEngine(String source,
Throwable t)
Check whether the engine should be failed
|
void |
onSettingsChanged() |
protected void |
recoverFromTranslog(EngineConfig engineConfig,
Translog.TranslogGeneration translogGeneration) |
void |
refresh(String source)
Refreshes the engine for new search operations to reflect the latest
changes.
|
List<Segment> |
segments(boolean verbose)
The list of segments in the engine.
|
SnapshotIndexCommit |
snapshotIndex(boolean flushFirst)
Snapshots the index and returns a handle to it.
|
Engine.SyncedFlushResult |
syncFlush(String syncId,
Engine.CommitId expectedCommitId)
Attempts to do a special commit where the given syncID is put into the commit data.
|
protected void |
writerSegmentStats(SegmentsStats stats) |
acquireSearcher, acquireSearcher, close, commitStats, config, ensureOpen, failEngine, flushAndClose, forceMerge, getFromSearcher, getSegmentInfo, guardedRamBytesUsed, isMergedSegment, newSearcher, readLastCommittedSegmentInfos, refreshNeeded, segmentReader, segmentsStats, wrapIfClosedpublic InternalEngine(EngineConfig engineConfig, boolean skipInitialTranslogRecovery) throws EngineException
EngineExceptionpublic Translog getTranslog()
EnginegetTranslog クラス内 Engineprotected void recoverFromTranslog(EngineConfig engineConfig, Translog.TranslogGeneration translogGeneration) throws IOException
IOExceptionpublic Engine.GetResult get(Engine.Get get) throws EngineException
get クラス内 EngineEngineExceptionpublic void create(Engine.Create create) throws EngineException
create クラス内 EngineEngineExceptionpublic boolean index(Engine.Index index) throws EngineException
index クラス内 EngineEngineExceptionpublic void delete(Engine.Delete delete) throws EngineException
delete クラス内 EngineEngineException@Deprecated public void delete(Engine.DeleteByQuery delete) throws EngineException
delete クラス内 EngineEngineExceptionpublic void refresh(String source) throws EngineException
Enginerefresh クラス内 EngineEngineExceptionpublic Engine.SyncedFlushResult syncFlush(String syncId, Engine.CommitId expectedCommitId) throws EngineException
EnginesyncFlush クラス内 EnginesyncId - id of this syncexpectedCommitId - the expected value ofEngineExceptionpublic Engine.CommitId flush() throws EngineException
Engineflush クラス内 EngineEngineExceptionpublic Engine.CommitId flush(boolean force, boolean waitIfOngoing) throws EngineException
Engineflush クラス内 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 void forceMerge(boolean flush,
int maxNumSegments,
boolean onlyExpungeDeletes,
boolean upgrade,
boolean upgradeOnlyAncientSegments)
throws EngineException,
EngineClosedException,
IOException
EngineforceMerge クラス内 EngineEngineExceptionEngineClosedExceptionIOExceptionpublic SnapshotIndexCommit snapshotIndex(boolean flushFirst) throws EngineException
EnginesnapshotIndex クラス内 EngineflushFirst - indicates whether the engine should flush before returning the snapshotEngineExceptionprotected boolean maybeFailEngine(String source, Throwable t)
EnginemaybeFailEngine クラス内 Engineprotected org.apache.lucene.index.SegmentInfos getLastCommittedSegmentInfos()
getLastCommittedSegmentInfos クラス内 Engineprotected final void writerSegmentStats(SegmentsStats stats)
writerSegmentStats クラス内 Enginepublic long indexWriterRAMBytesUsed()
EngineindexWriterRAMBytesUsed クラス内 Enginepublic List<Segment> segments(boolean verbose)
Engineprotected final void closeNoLock(String reason)
closeNoLock クラス内 Enginepublic boolean hasUncommittedChanges()
Enginetrue the internal writer has any uncommitted changes. Otherwise falsehasUncommittedChanges クラス内 Engineprotected org.apache.lucene.search.SearcherManager getSearcherManager()
getSearcherManager クラス内 Enginepublic void activateThrottling()
public void deactivateThrottling()
public void onSettingsChanged()
onSettingsChanged クラス内 Enginepublic MergeStats getMergeStats()
getMergeStats クラス内 EngineCopyright © 2009–2016. All rights reserved.