blob: a607addc9a66328bd88f170e71e125cdb17e5d06 [file] [log] [blame]
Jonathan Hart6df90172014-04-03 10:13:11 -07001package net.onrc.onos.core.datastore.internal;
Yuta HIGUCHI66ca1bf2014-03-12 18:34:09 -07002
Jonathan Hart6df90172014-04-03 10:13:11 -07003import net.onrc.onos.core.datastore.IMultiEntryOperation;
Yuta HIGUCHI66ca1bf2014-03-12 18:34:09 -07004
5/**
6 * Interface for backend to realize IMultiEntryOperation.
7 *
8 * Backend implementation must use these interfaces to update IMultiEntryOperation
9 * in order to support KVObject.
10 */
11public interface IModifiableMultiEntryOperation extends IMultiEntryOperation {
12
13 /**
14 * Set value and version.
15 *
16 * Expected to be called on multiRead implementations.
17 * @param value
18 * @param version
19 */
20 public void setValue(final byte[] value, final long version);
21
22 /**
23 * Update version of the value.
24 *
25 * Expected to be called on multiWrite, multiRead implementations.
26 * @param version
27 */
28 public void setVersion(long version);
29
30 /**
31 * Update status.
32 *
33 * Backend implementation is expected to update to SUCCESS or FAILED after
34 * datastore operation.
35 * @param status
36 */
37 public void setStatus(STATUS status);
38
39 /**
40 * Return actual IModifiableMultiEntryOperation if is a wrapper, this otherwise.
41 * @return actual IModifiableMultiEntryOperation directly interact with data store
42 */
43 public IModifiableMultiEntryOperation getActualOperation();
44}