Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Madan Jampani
2014-11-04 18:11:51 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1416d2ebac8d07290df2235587d5755669c2a350
1416d2eb
1 parent
37c2e706
Add missing file
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
core/store/dist/src/main/java/org/onlab/onos/store/service/VersionedValue.java
core/store/dist/src/main/java/org/onlab/onos/store/service/VersionedValue.java
0 → 100644
View file @
1416d2e
package
org
.
onlab
.
onos
.
store
.
service
;
import
java.util.Arrays
;
/**
* Wrapper object that holds the object (as byte array) and its version.
*/
public
class
VersionedValue
{
private
final
byte
[]
value
;
private
final
long
version
;
/**
* Creates a new instance with the specified value and version.
* @param value
* @param version
*/
public
VersionedValue
(
byte
[]
value
,
long
version
)
{
this
.
value
=
value
;
this
.
version
=
version
;
}
/**
* Returns the value.
* @return value.
*/
public
byte
[]
value
()
{
return
value
;
}
/**
* Returns the version.
* @return version.
*/
public
long
version
()
{
return
version
;
}
@Override
public
String
toString
()
{
return
"VersionedValue [value="
+
Arrays
.
toString
(
value
)
+
", version="
+
version
+
"]"
;
}
}
Please
register
or
login
to post a comment