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.WriteResult; |
| 4 | |
| 5 | public class InternalWriteResult { |
| 6 | |
| 7 | public enum Status { |
| 8 | OK, |
| 9 | ABORTED, |
| 10 | NO_SUCH_TABLE, |
| 11 | OPTIMISTIC_LOCK_FAILURE, |
| 12 | PREVIOUS_VALUE_MISMATCH |
| 13 | } |
| 14 | |
| 15 | private final Status status; |
| 16 | private final WriteResult result; |
| 17 | |
| 18 | public InternalWriteResult(Status status, WriteResult result) { |
| 19 | this.status = status; |
| 20 | this.result = result; |
| 21 | } |
| 22 | |
| 23 | public Status status() { |
| 24 | return status; |
| 25 | } |
| 26 | |
| 27 | public WriteResult result() { |
| 28 | return result; |
| 29 | } |
| 30 | } |