From 5d6b56353ce3a2816410052d4b2b531c0c676c06 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 18 Jan 2008 16:37:24 +0000
Subject: [PATCH] Enhancement to fix for issue 2499. Added nanosecond processing time method to AbstractOperation API. Removed the dashes in the etime resolution configuration enum values. Added get/setUseNanoTime methods to DirectoryServer class
---
opends/src/server/org/opends/server/core/SearchOperationBasis.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/SearchOperationBasis.java b/opends/src/server/org/opends/server/core/SearchOperationBasis.java
index 927fa69..a6ff622 100644
--- a/opends/src/server/org/opends/server/core/SearchOperationBasis.java
+++ b/opends/src/server/org/opends/server/core/SearchOperationBasis.java
@@ -627,9 +627,8 @@
// See if the time limit has expired. If so, then don't send the entry and
// indicate that the search should end.
- if ((getTimeLimit() > 0) &&
- ((getUseNanoTime() ? TimeThread.getNanoTime() :
- TimeThread.getTime()) >= getTimeLimitExpiration()))
+ if ((getTimeLimit() > 0) && (TimeThread.getTime() >=
+ getTimeLimitExpiration()))
{
setResultCode(ResultCode.TIME_LIMIT_EXCEEDED);
appendErrorMessage(ERR_SEARCH_TIME_LIMIT_EXCEEDED.get(getTimeLimit()));
@@ -1055,9 +1054,8 @@
// See if the time limit has expired. If so, then don't send the entry and
// indicate that the search should end.
- if ((getTimeLimit() > 0) &&
- ((getUseNanoTime() ? TimeThread.getNanoTime() :
- TimeThread.getTime()) >= getTimeLimitExpiration()))
+ if ((getTimeLimit() > 0) && (TimeThread.getTime() >=
+ getTimeLimitExpiration()))
{
setResultCode(ResultCode.TIME_LIMIT_EXCEEDED);
appendErrorMessage(ERR_SEARCH_TIME_LIMIT_EXCEEDED.get(getTimeLimit()));
@@ -1625,8 +1623,8 @@
else
{
// FIXME -- Factor in the user's effective time limit.
- timeLimitExpiration = getProcessingStartTime() +
- ((getUseNanoTime() ? 1000000000L : 1000L) * timeLimit);
+ timeLimitExpiration =
+ getProcessingStartTime() + (1000L * timeLimit);
}
setTimeLimitExpiration(timeLimitExpiration);
--
Gitblit v1.10.0