Package com.couchbase.client.core.cnc
Class OrphanReporter
- java.lang.Object
-
- com.couchbase.client.core.cnc.OrphanReporter
-
-
Field Summary
Fields Modifier and Type Field Description static String
ORPHAN_TREAD_PREFIX
-
Constructor Summary
Constructors Constructor Description OrphanReporter(EventBus eventBus, OrphanReporterConfig config)
Creates a newOrphanReporter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OrphanReporterConfig
config()
Returns the currently active configuration.void
report(Request<?> request)
Reports an orphanedRequest
.Mono<Void>
start()
Starts the orphan reporter.Mono<Void>
stop()
Stops the orphan reporter.
-
-
-
Field Detail
-
ORPHAN_TREAD_PREFIX
public static final String ORPHAN_TREAD_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OrphanReporter
@Internal public OrphanReporter(EventBus eventBus, OrphanReporterConfig config)
Creates a newOrphanReporter
.Please do not instantiate this class directly, but rather let it be handled through the environment and customize it through the
OrphanReporterConfig
which can also be provided on the environment.- Parameters:
eventBus
- the event bus where the messages should be emitted on.config
- the configuration for this reporter.
-
-
Method Detail
-
config
public OrphanReporterConfig config()
Returns the currently active configuration.
-
start
public Mono<Void> start()
Starts the orphan reporter.- Returns:
- completes the Mono once it has been started properly.
-
stop
public Mono<Void> stop()
Stops the orphan reporter.- Returns:
- completes the Mono once it has been stopped properly.
-
report
public void report(Request<?> request)
Reports an orphanedRequest
.If the orphan could not be recorded because the buffer is full, a
OrphanRecordDroppedEvent
will be raised on the event bus.If you wish to ignore certain requests as being considered in the orphan reporting, make sure they implement the
UnmonitoredRequest
marker interface.- Parameters:
request
- the request to report as orphan.
-
-