Showing
4 changed files
with
16 additions
and
0 deletions
... | @@ -15,6 +15,9 @@ import org.onlab.onos.store.service.DatabaseException; | ... | @@ -15,6 +15,9 @@ import org.onlab.onos.store.service.DatabaseException; |
15 | import org.onlab.onos.store.service.ReadRequest; | 15 | import org.onlab.onos.store.service.ReadRequest; |
16 | import org.onlab.onos.store.service.WriteRequest; | 16 | import org.onlab.onos.store.service.WriteRequest; |
17 | 17 | ||
18 | +/** | ||
19 | + * Client for interacting with the Copycat Raft cluster. | ||
20 | + */ | ||
18 | public class DatabaseClient { | 21 | public class DatabaseClient { |
19 | 22 | ||
20 | private final ProtocolClient client; | 23 | private final ProtocolClient client; | ... | ... |
... | @@ -19,6 +19,13 @@ import org.onlab.util.KryoNamespace; | ... | @@ -19,6 +19,13 @@ import org.onlab.util.KryoNamespace; |
19 | 19 | ||
20 | import com.google.common.collect.Maps; | 20 | import com.google.common.collect.Maps; |
21 | 21 | ||
22 | +/** | ||
23 | + * StateMachine whose transitions are coordinated/replicated | ||
24 | + * by Raft consensus. | ||
25 | + * Each Raft cluster member has a instance of this state machine that is | ||
26 | + * independently updated in lock step once there is consensus | ||
27 | + * on the next transition. | ||
28 | + */ | ||
22 | public class DatabaseStateMachine implements StateMachine { | 29 | public class DatabaseStateMachine implements StateMachine { |
23 | 30 | ||
24 | public static final KryoSerializer SERIALIZER = new KryoSerializer() { | 31 | public static final KryoSerializer SERIALIZER = new KryoSerializer() { | ... | ... |
... | @@ -2,6 +2,9 @@ package org.onlab.onos.store.service.impl; | ... | @@ -2,6 +2,9 @@ package org.onlab.onos.store.service.impl; |
2 | 2 | ||
3 | import org.onlab.onos.store.service.ReadResult; | 3 | import org.onlab.onos.store.service.ReadResult; |
4 | 4 | ||
5 | +/** | ||
6 | + * Result of a read operation executed on the DatabaseStateMachine. | ||
7 | + */ | ||
5 | public class InternalReadResult { | 8 | public class InternalReadResult { |
6 | 9 | ||
7 | public enum Status { | 10 | public enum Status { | ... | ... |
... | @@ -2,6 +2,9 @@ package org.onlab.onos.store.service.impl; | ... | @@ -2,6 +2,9 @@ package org.onlab.onos.store.service.impl; |
2 | 2 | ||
3 | import org.onlab.onos.store.service.WriteResult; | 3 | import org.onlab.onos.store.service.WriteResult; |
4 | 4 | ||
5 | +/** | ||
6 | + * Result of a write operation executed on the DatabaseStateMachine. | ||
7 | + */ | ||
5 | public class InternalWriteResult { | 8 | public class InternalWriteResult { |
6 | 9 | ||
7 | public enum Status { | 10 | public enum Status { | ... | ... |
-
Please register or login to post a comment