Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame] | 1 | package org.onlab.onos.store.service.impl; |
| 2 | |
| 3 | import org.onlab.onos.store.service.ReadResult; |
| 4 | |
Madan Jampani | 686fa18 | 2014-11-04 23:16:27 -0800 | [diff] [blame] | 5 | /** |
| 6 | * Result of a read operation executed on the DatabaseStateMachine. |
| 7 | */ |
Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame] | 8 | public class InternalReadResult { |
| 9 | |
| 10 | public enum Status { |
| 11 | OK, |
| 12 | NO_SUCH_TABLE |
| 13 | } |
| 14 | |
| 15 | private final Status status; |
| 16 | private final ReadResult result; |
| 17 | |
| 18 | public InternalReadResult(Status status, ReadResult result) { |
| 19 | this.status = status; |
| 20 | this.result = result; |
| 21 | } |
| 22 | |
| 23 | public Status status() { |
| 24 | return status; |
| 25 | } |
| 26 | |
| 27 | public ReadResult result() { |
| 28 | return result; |
| 29 | } |
| 30 | |
| 31 | @Override |
| 32 | public String toString() { |
| 33 | return "InternalReadResult [status=" + status + ", result=" + result |
| 34 | + "]"; |
| 35 | } |
| 36 | } |