blob: d016ba19ec5a0dc200c7d97654963ca5af1f89fa [file] [log] [blame]
Madan Jampani08822c42014-11-04 17:17:46 -08001package org.onlab.onos.store.service.impl;
2
Yuta HIGUCHI361664e2014-11-06 17:28:47 -08003import java.io.Serializable;
4
Madan Jampani08822c42014-11-04 17:17:46 -08005import org.onlab.onos.store.service.ReadResult;
6
Madan Jampani686fa182014-11-04 23:16:27 -08007/**
8 * Result of a read operation executed on the DatabaseStateMachine.
9 */
Yuta HIGUCHI361664e2014-11-06 17:28:47 -080010@SuppressWarnings("serial")
11public class InternalReadResult implements Serializable {
Madan Jampani08822c42014-11-04 17:17:46 -080012
13 public enum Status {
14 OK,
15 NO_SUCH_TABLE
16 }
17
18 private final Status status;
19 private final ReadResult result;
20
21 public InternalReadResult(Status status, ReadResult result) {
22 this.status = status;
23 this.result = result;
24 }
25
26 public Status status() {
27 return status;
28 }
29
30 public ReadResult result() {
31 return result;
32 }
33
34 @Override
35 public String toString() {
36 return "InternalReadResult [status=" + status + ", result=" + result
37 + "]";
38 }
39}