Javadoc fixess
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseAdminService.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseAdminService.java
index 7cb5f55..3ec4e9b 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseAdminService.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseAdminService.java
@@ -3,7 +3,7 @@
import java.util.List;
/**
- * Service for running administrative tasks on a Database.
+ * Service interface for running administrative tasks on a Database.
*/
public interface DatabaseAdminService {
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseService.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseService.java
index 08bfa36..449fd71 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseService.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/DatabaseService.java
@@ -2,13 +2,17 @@
import java.util.List;
+/**
+ * Service interface for a strongly consistent and durable
+ * key value data store.
+ */
public interface DatabaseService {
/**
* Performs a read on the database.
* @param request read request.
* @return ReadResult
- * @throws DatabaseException
+ * @throws DatabaseException if there is a failure in executing read.
*/
ReadResult read(ReadRequest request);
@@ -16,7 +20,7 @@
* Performs a batch read operation on the database.
* The main advantage of batch read operation is parallelization.
* @param batch batch of read requests to execute.
- * @return
+ * @return batch read result.
*/
List<OptionalResult<ReadResult, DatabaseException>> batchRead(List<ReadRequest> batch);
@@ -24,7 +28,7 @@
* Performs a write operation on the database.
* @param request
* @return write result.
- * @throws DatabaseException
+ * @throws DatabaseException if there is failure in execution write.
*/
WriteResult write(WriteRequest request);
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/OptionalResult.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/OptionalResult.java
index fa38e3f..a9341cb 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/OptionalResult.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/OptionalResult.java
@@ -5,16 +5,16 @@
* <p>
* If a result is present, get() will return it otherwise get() will throw
* the exception that was encountered in the process of generating the result.
- *
+ * </p>
* @param <R> type of result.
* @param <E> exception encountered in generating the result.
*/
public interface OptionalResult<R, E extends Throwable> {
/**
- * Returns the result.
+ * Returns the result or throws an exception if there is no
+ * valid result.
* @return result
- * @throws E if there is no valid result.
*/
public R get();
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/PreconditionFailedException.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/PreconditionFailedException.java
index f16fc47..8a631a0 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/PreconditionFailedException.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/PreconditionFailedException.java
@@ -2,7 +2,8 @@
/**
* Exception that indicates a precondition failure.
- * <ul>Scenarios that can cause this exception:
+ * Scenarios that can cause this exception:
+ * <ul>
* <li>An operation that attempts to write a new value iff the current value is equal
* to some specified value.</li>
* <li>An operation that attempts to write a new value iff the current version
@@ -11,4 +12,4 @@
*/
@SuppressWarnings("serial")
public class PreconditionFailedException extends DatabaseException {
-}
+}
\ No newline at end of file
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java
index 2d7649a..0db5dfe 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java
@@ -1,6 +1,5 @@
package org.onlab.onos.store.service;
-import org.onlab.onos.store.service.impl.VersionedValue;
/**
* Database read result.
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java
index 64e9b74..fa20a04 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java
@@ -1,6 +1,5 @@
package org.onlab.onos.store.service;
-import org.onlab.onos.store.service.impl.VersionedValue;
/**
* Database write result.
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
index cbca729..663e9e4 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseStateMachine.java
@@ -12,6 +12,7 @@
import org.onlab.onos.store.serializers.KryoSerializer;
import org.onlab.onos.store.service.ReadRequest;
import org.onlab.onos.store.service.ReadResult;
+import org.onlab.onos.store.service.VersionedValue;
import org.onlab.onos.store.service.WriteRequest;
import org.onlab.onos.store.service.WriteResult;
import org.onlab.util.KryoNamespace;
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/NettyProtocol.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/NettyProtocol.java
index 9855ec6..9a2259a 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/NettyProtocol.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/NettyProtocol.java
@@ -33,6 +33,7 @@
import org.onlab.onos.store.serializers.KryoSerializer;
import org.onlab.onos.store.service.ReadRequest;
import org.onlab.onos.store.service.ReadResult;
+import org.onlab.onos.store.service.VersionedValue;
import org.onlab.onos.store.service.WriteRequest;
import org.onlab.onos.store.service.WriteResult;
import org.onlab.util.KryoNamespace;
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/VersionedValue.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/VersionedValue.java
deleted file mode 100644
index 31bdcc2..0000000
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/VersionedValue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.onlab.onos.store.service.impl;
-
-import java.util.Arrays;
-
-/**
- * Wrapper object that holds the object (as byte array) and its version.
- */
-public class VersionedValue {
-
- private final byte[] value;
- private final long version;
-
- /**
- * Creates a new instance with the specified value and version.
- * @param value
- * @param version
- */
- public VersionedValue(byte[] value, long version) {
- this.value = value;
- this.version = version;
- }
-
- /**
- * Returns the value.
- * @return value.
- */
- public byte[] value() {
- return value;
- }
-
- /**
- * Returns the version.
- * @return version.
- */
- public long version() {
- return version;
- }
-
- @Override
- public String toString() {
- return "VersionedValue [value=" + Arrays.toString(value) + ", version="
- + version + "]";
- }
-}