You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2018/09/26 08:34:00 UTC

[directory-server] 01/06: added txn implementation classes

This is an automated email from the ASF dual-hosted git repository.

kayyagari pushed a commit to branch bdb-je-partition
in repository https://gitbox.apache.org/repos/asf/directory-server.git

commit 6504a6fc45a80436984d5eb7034ab970b2b944c8
Author: kayyagari <ka...@apache.org>
AuthorDate: Wed Sep 26 13:57:04 2018 +0530

    added txn implementation classes
---
 .../core/api/partition/PartitionReadTxn.java       | 39 +---------------------
 ...itionReadTxn.java => PartitionReadTxnImpl.java} | 31 ++++++-----------
 .../core/api/partition/PartitionWriteTxn.java      | 39 +---------------------
 ...tionReadTxn.java => PartitionWriteTxnImpl.java} | 28 +++++-----------
 4 files changed, 22 insertions(+), 115 deletions(-)

diff --git a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
index 62e7797..f5a0cd2 100644
--- a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
+++ b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
@@ -19,48 +19,11 @@
  */
 package org.apache.directory.server.core.api.partition;
 
-import java.io.IOException;
-
 /**
  * The Read Transaction interface
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PartitionReadTxn implements PartitionTxn
+public interface PartitionReadTxn extends PartitionTxn
 {
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void commit() throws IOException
-    {
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void abort() throws IOException
-    {
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isClosed()
-    {
-        return false;
-    }
-
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void close() throws IOException
-    {
-    }
 }
diff --git a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxnImpl.java
similarity index 82%
copy from core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
copy to core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxnImpl.java
index 62e7797..ede6cfd 100644
--- a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
+++ b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxnImpl.java
@@ -6,59 +6,50 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
  *  under the License.
- * 
+ *
  */
+
 package org.apache.directory.server.core.api.partition;
 
+
 import java.io.IOException;
 
+
 /**
- * The Read Transaction interface
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ *         Project</a>
  */
-public class PartitionReadTxn implements PartitionTxn
+public class PartitionReadTxnImpl implements PartitionReadTxn
 {
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public void commit() throws IOException
     {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void abort() throws IOException
     {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean isClosed()
     {
         return false;
     }
 
-    
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public void close() throws IOException
     {
diff --git a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxn.java b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxn.java
index 2c1f7f0..dec7f3b 100644
--- a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxn.java
+++ b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxn.java
@@ -19,48 +19,11 @@
  */
 package org.apache.directory.server.core.api.partition;
 
-import java.io.IOException;
-
 /**
  * The Write Transaction interface
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PartitionWriteTxn implements PartitionTxn
+public interface PartitionWriteTxn extends PartitionTxn
 {
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void commit() throws IOException
-    {
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void abort() throws IOException
-    {
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isClosed()
-    {
-        return false;
-    }
-
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void close() throws IOException
-    {
-    }
 }
diff --git a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxnImpl.java
similarity index 83%
copy from core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
copy to core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxnImpl.java
index 62e7797..67217d7 100644
--- a/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionReadTxn.java
+++ b/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionWriteTxnImpl.java
@@ -6,59 +6,49 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
  *  under the License.
- * 
+ *
  */
+
 package org.apache.directory.server.core.api.partition;
 
+
 import java.io.IOException;
 
+
 /**
- * The Read Transaction interface
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PartitionReadTxn implements PartitionTxn
+public class PartitionWriteTxnImpl implements PartitionWriteTxn
 {
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public void commit() throws IOException
     {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void abort() throws IOException
     {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean isClosed()
     {
         return false;
     }
 
-    
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public void close() throws IOException
     {