blob: 8a23330deddb1facf6f6b5b03065841a16e9b242 [file] [log] [blame]
Yuta HIGUCHI66ca1bf2014-03-12 18:34:09 -07001package net.onrc.onos.datastore.internal;
2
3import net.onrc.onos.datastore.IMultiEntryOperation;
4
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}