org.apache.directory.server.ldap.handlers
Class SearchTimeLimitingMonitor

java.lang.Object
  extended by org.apache.directory.server.ldap.handlers.SearchTimeLimitingMonitor
All Implemented Interfaces:
org.apache.directory.shared.ldap.cursor.ClosureMonitor

public class SearchTimeLimitingMonitor
extends java.lang.Object
implements org.apache.directory.shared.ldap.cursor.ClosureMonitor

A ClosureMonitor implementation which takes into account a time limit.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
SearchTimeLimitingMonitor(long timeToLive, java.util.concurrent.TimeUnit unit)
          Creates a new instance of SearchTimeLimitingMonitor.
 
Method Summary
 void checkNotClosed()
           
 void close()
           
 void close(java.lang.Exception cause)
           
 void close(java.lang.String cause)
           
 java.lang.Exception getCause()
           
 boolean isClosed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTimeLimitingMonitor

public SearchTimeLimitingMonitor(long timeToLive,
                                 java.util.concurrent.TimeUnit unit)
Creates a new instance of SearchTimeLimitingMonitor.

Parameters:
timeToLive - the time before changing state to closed.
unit - the time units for the timeToLive parameter
See Also:
TimeUnit}
Method Detail

checkNotClosed

public void checkNotClosed()
                    throws java.lang.Exception
Specified by:
checkNotClosed in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor
Throws:
java.lang.Exception

close

public void close()
Specified by:
close in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor

close

public void close(java.lang.String cause)
Specified by:
close in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor

close

public void close(java.lang.Exception cause)
Specified by:
close in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor

getCause

public java.lang.Exception getCause()
Specified by:
getCause in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface org.apache.directory.shared.ldap.cursor.ClosureMonitor


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.