| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2013 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | abstract class AbstractLDAPFutureResultImpl<S extends Result> |
| | | extends AsynchronousFutureResult<S, ResultHandler<? super S>> |
| | | implements IntermediateResponseHandler { |
| | | |
| | | private final Connection connection; |
| | | |
| | | private final int requestID; |
| | | |
| | | private IntermediateResponseHandler intermediateResponseHandler; |
| | | |
| | | private volatile long timestamp; |
| | | |
| | | AbstractLDAPFutureResultImpl(final int requestID, |
| | |
| | | timestamp = System.currentTimeMillis(); |
| | | } |
| | | |
| | | /** |
| | | * Returns {@code true} if this request should be canceled once the timeout |
| | | * period expires. The default implementation is to return {@code true} |
| | | * which will be appropriate for nearly all requests, the one obvious |
| | | * exception being persistent searches. |
| | | * |
| | | * @return {@code true} if this request should be canceled once the timeout |
| | | * period expires. |
| | | */ |
| | | boolean checkForTimeout() { |
| | | return true; |
| | | } |
| | | } |