public class SearchTimeLimitingMonitor
extends java.lang.Object
implements org.apache.directory.api.ldap.model.cursor.ClosureMonitor
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Exception |
cause |
private boolean |
closed |
private long |
millisToLive |
private long |
startTime |
| Constructor and Description |
|---|
SearchTimeLimitingMonitor(long timeToLive,
java.util.concurrent.TimeUnit unit)
Creates a new instance of SearchTimeLimitingMonitor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkNotClosed() |
void |
close() |
void |
close(java.lang.Exception cause) |
void |
close(java.lang.String cause) |
java.lang.Exception |
getCause() |
boolean |
isClosed() |
private final long startTime
private final long millisToLive
private boolean closed
private java.lang.Exception cause
public SearchTimeLimitingMonitor(long timeToLive,
java.util.concurrent.TimeUnit unit)
timeToLive - the time before changing state to closed.unit - the time units for the timeToLive parameterTimeUnitpublic void checkNotClosed()
throws org.apache.directory.api.ldap.model.cursor.CursorClosedException
checkNotClosed in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitororg.apache.directory.api.ldap.model.cursor.CursorClosedExceptionpublic void close()
close in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitorpublic void close(java.lang.String cause)
close in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitorpublic void close(java.lang.Exception cause)
close in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitorpublic java.lang.Exception getCause()
getCause in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitorpublic boolean isClosed()
isClosed in interface org.apache.directory.api.ldap.model.cursor.ClosureMonitor