Interface ClosureMonitor
- All Known Implementing Classes:
DefaultClosureMonitor
public interface ClosureMonitor
A monitor used by Cursors to detect conditions when they should stop
performing some work during advance operations such as next(), previous(),
first() etc, and release resources.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if state of this ClosureMonitor is set to closed and if so, throws the causing Exception.voidclose()Sets monitor state to closed, and sets the cause to a CursorClosedException without an error message string.voidSets monitor state to closed, and sets the cause to a specific Exception.voidSets monitor state to closed, and sets the cause to a CursorClosedException with a specific error message string.getCause()Gets the cause of the closure.booleanisClosed()Gets whether the state of this ClosureMonitor is set to closed.
-
Method Details
-
close
void close()Sets monitor state to closed, and sets the cause to a CursorClosedException without an error message string. -
close
Sets monitor state to closed, and sets the cause to a CursorClosedException with a specific error message string.- Parameters:
cause- error message string
-
close
Sets monitor state to closed, and sets the cause to a specific Exception.- Parameters:
cause- the exception to associate with the closure
-
isClosed
boolean isClosed()Gets whether the state of this ClosureMonitor is set to closed.- Returns:
- true if state is closed, false if open
-
checkNotClosed
Checks if state of this ClosureMonitor is set to closed and if so, throws the causing Exception.- Throws:
CursorClosedException- the cause of the closure
-
getCause
-