jruby/docs BETA
Navigation
org.apache.lucene.index.MergePolicy 7
C MergeAbortedException
I MergeContext
C MergeException
C MergeObserver
C MergeSpecification
C OneMerge
C OneMergeProgress
OneMergeProgress — members 6
C new()
C abort()
M aborted?() boolean
C pause_nanos(pause_nanos, reason, condition)
M pause_times() PauseReason,Long>
C wakeup()

org.apache.lucene.index.MergePolicy.OneMergeProgress

class 6 members

Progress and state for an executing merge. This class encapsulates the logic to pause and resume the merge thread or to abort the merge entirely.

Constructors

new

new ( )
Java: <init>()

Creates a new merge progress info.

Instance Methods

abort

abort ( )
Java: abort()

Abort the merge this progress tracks at the next possible moment.

aborted?

boolean aborted? ( )
Java: isAborted() · also: is_aborted

Return the aborted state of this merge.

pause_nanos

pause_nanos ( long pause_nanos, MergePolicy.OneMergeProgress.PauseReason reason, BooleanSupplier condition )
Java: pauseNanos(long pauseNanos, org.apache.lucene.index.MergePolicy.OneMergeProgress.PauseReason reason, java.util.function.BooleanSupplier condition)

Pauses the calling thread for at least pauseNanos nanoseconds unless the merge is aborted or the external condition returns false, in which case control returns immediately.

The external condition is required so that other threads can terminate the pausing immediately, before pauseNanos expires. We can't rely on just Condition#awaitNanos(long) alone because it can return due to spurious wakeups too.

nametypedescription
conditionjava.util.function.BooleanSupplierThe pause condition that should return false if immediate return from this method is needed. Other threads can wake up any sleeping thread by calling #wakeup, but it'd fall to sleep for the remainder of the requested time if this condition

pause_times

Map<MergePolicy.OneMergeProgress.PauseReason,Long> pause_times ( )
Java: getPauseTimes() · also: get_pause_times

Returns pause reasons and associated times in nanoseconds.

wakeup

wakeup ( )
Java: wakeup()

Request a wakeup for any threads stalled in #pauseNanos.

this work for additional information regarding copyright ownership.