directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1398682 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
Date Tue, 16 Oct 2012 07:18:54 GMT
Author: kayyagari
Date: Tue Oct 16 07:18:53 2012
New Revision: 1398682

URL: http://svn.apache.org/viewvc?rev=1398682&view=rev
Log:
added a directory for holding the replication logs

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java?rev=1398682&r1=1398681&r2=1398682&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
Tue Oct 16 07:18:53 2012
@@ -81,7 +81,8 @@ public class InstanceLayout extends Abst
     private static final String RUN_NAME = "run";
     private static final String CONF_NAME = "conf";
     private static final String PARTITIONS_NAME = "partitions";
-
+    private static final String REPL_NAME = "syncrepl-data";
+    
     /** Static file names */
     private static final String LOG4J_PROPERTIES = "log4j.properties";
     private static final String WRAPPER_CONF = "wrapper.conf";
@@ -99,6 +100,8 @@ public class InstanceLayout extends Abst
     /** The Conf directory */
     private File confDir;
 
+    /** The replication data directory */
+    private File replDir;
 
     /**
      * Creates a new instance of InstanceLayout.
@@ -313,6 +316,31 @@ public class InstanceLayout extends Abst
     }
 
 
+    /**
+     * Gets the 'replication' directory where replication journals are stored.
+     *
+     * @return the 'replication' directory
+     */
+    public File getReplDirectory()
+    {
+        if ( replDir == null )
+        {
+            replDir = new File( getInstanceDirectory(), REPL_NAME );
+        }
+
+        return replDir;
+    }
+
+
+    /**
+     * @param replDir the replication journal data directory
+     */
+    public void setReplDirectory( File replDir )
+    {
+        this.replDir = replDir;
+    }
+
+
     public String toString()
     {
         return "Instance Layout: \n" +
@@ -320,6 +348,7 @@ public class InstanceLayout extends Abst
             "  Instance conf dir       : " + getConfDirectory() + "\n" +
             "  Instance log dir        : " + getLogDirectory() + "\n" +
             "  Instance run dir        : " + getRunDirectory() + "\n" +
-            "  Instance partitions dir : " + getPartitionsDirectory() + "\n";
+            "  Instance partitions dir : " + getPartitionsDirectory() + "\n" +
+            "  Instance replication data dir        : " + getLogDirectory() + "\n";
     }
 }



Mime
View raw message