From 9defd2349274d077ad120d780a6fac5f6d594c7f Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 22 May 2015 15:58:46 +0000
Subject: [PATCH] OPENDJ-1631 CR-6864 Migrate server to SDK syntaxes

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java
index 28c80ff..41660e0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java
@@ -42,6 +42,7 @@
 import org.opends.server.api.DirectoryThread;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.core.SearchOperation;
+import org.opends.server.core.ServerContext;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 import org.opends.server.types.*;
 import org.opends.server.types.LockManager.DNLock;
@@ -127,23 +128,25 @@
   /** The set of tasks that are currently running. */
   private TreeSet<Task> runningTasks;
 
-
+  private ServerContext serverContext;
 
   /**
    * Creates a new task scheduler that will be used to ensure that tasks are
    * invoked at the appropriate times.
-   *
+   * @param serverContext
+   *            The server context
    * @param  taskBackend  The task backend with which this scheduler is
    *                      associated.
    *
    * @throws  InitializationException  If a problem occurs while initializing
    *                                   the scheduler from the backing file.
    */
-  public TaskScheduler(TaskBackend taskBackend)
+  public TaskScheduler(ServerContext serverContext, TaskBackend taskBackend)
          throws InitializationException
   {
     super("Task Scheduler Thread");
 
+    this.serverContext = serverContext;
 
     this.taskBackend = taskBackend;
 
@@ -1898,7 +1901,7 @@
     // Perform the necessary internal and external initialization for the task.
     try
     {
-      task.initializeTaskInternal(this, entry);
+      task.initializeTaskInternal(serverContext, this, entry);
     }
     catch (InitializationException ie)
     {
@@ -1949,7 +1952,7 @@
   public RecurringTask entryToRecurringTask(Entry entry)
          throws DirectoryException
   {
-    return new RecurringTask(this, entry);
+    return new RecurringTask(serverContext, this, entry);
   }
 
 

--
Gitblit v1.10.0