|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.cursor.DefaultClosureMonitor
public class DefaultClosureMonitor
A basic ClosureMonitor that simply uses a boolean for state and a cause exception. Note that we consciously chose not to synchronize close() operations with checks to see if the monitor state is closed because it costs to synchronize and it's OK for the Cursor not to stop immediately when close() is called.
| Constructor Summary | |
|---|---|
DefaultClosureMonitor()
|
|
| Method Summary | |
|---|---|
void |
checkNotClosed()
Checks if state of this ClosureMonitor is set to closed and if so, throws the causing Exception. |
void |
close()
Sets monitor state to closed, and sets the cause to a CursorClosedException without an error message string. |
void |
close(java.lang.Exception cause)
Sets monitor state to closed, and sets the cause to a specific Exception. |
void |
close(java.lang.String cause)
Sets monitor state to closed, and sets the cause to a CursorClosedException with a specific error message string. |
java.lang.Exception |
getCause()
Gets the cause of the closure. |
boolean |
isClosed()
Gets whether the state of this ClosureMonitor is set to closed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultClosureMonitor()
| Method Detail |
|---|
public final void close()
ClosureMonitor
close in interface ClosureMonitorpublic final void close(java.lang.String cause)
ClosureMonitor
close in interface ClosureMonitorcause - error message stringpublic final void close(java.lang.Exception cause)
ClosureMonitor
close in interface ClosureMonitorcause - the exception to associate with the closurepublic final java.lang.Exception getCause()
ClosureMonitor
getCause in interface ClosureMonitorpublic final boolean isClosed()
ClosureMonitor
isClosed in interface ClosureMonitor
public void checkNotClosed()
throws java.lang.Exception
ClosureMonitor
checkNotClosed in interface ClosureMonitorjava.lang.Exception - the cause of the closure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||