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
Yuta HIGUCHI
2014-11-04 21:22:45 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5e1cfe01e86378d90165dc49916a57d141052d38
5e1cfe01
1 parent
dfbfa18d
add toString
Change-Id: I2a38b27164c4c4c0e259a32dbb283dd384b61c26
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
9 deletions
core/store/dist/src/main/java/org/onlab/onos/store/service/ReadRequest.java
core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java
core/store/dist/src/main/java/org/onlab/onos/store/service/VersionedValue.java
core/store/dist/src/main/java/org/onlab/onos/store/service/WriteRequest.java
core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java
core/store/dist/src/main/java/org/onlab/onos/store/service/ReadRequest.java
View file @
5e1cfe0
package
org
.
onlab
.
onos
.
store
.
service
;
import
com.google.common.base.MoreObjects
;
/**
* Database read request.
*/
...
...
@@ -31,6 +33,9 @@ public class ReadRequest {
@Override
public
String
toString
()
{
return
"ReadRequest [tableName="
+
tableName
+
", key="
+
key
+
"]"
;
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"tableName"
,
tableName
)
.
add
(
"key"
,
key
)
.
toString
();
}
}
\ No newline at end of file
...
...
core/store/dist/src/main/java/org/onlab/onos/store/service/ReadResult.java
View file @
5e1cfe0
package
org
.
onlab
.
onos
.
store
.
service
;
import
com.google.common.base.MoreObjects
;
/**
* Database read result.
...
...
@@ -18,7 +20,7 @@ public class ReadResult {
/**
* Returns database table name.
* @return table name
.
* @return table name
*/
public
String
tableName
()
{
return
tableName
;
...
...
@@ -26,7 +28,7 @@ public class ReadResult {
/**
* Returns database table key.
* @return key
.
* @return key
*/
public
String
key
()
{
return
key
;
...
...
@@ -39,4 +41,13 @@ public class ReadResult {
public
VersionedValue
value
()
{
return
value
;
}
@Override
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"tableName"
,
tableName
)
.
add
(
"key"
,
key
)
.
add
(
"value"
,
value
)
.
toString
();
}
}
...
...
core/store/dist/src/main/java/org/onlab/onos/store/service/VersionedValue.java
View file @
5e1cfe0
...
...
@@ -2,6 +2,8 @@ package org.onlab.onos.store.service;
import
java.util.Arrays
;
import
com.google.common.base.MoreObjects
;
/**
* Wrapper object that holds the object (as byte array) and its version.
*/
...
...
@@ -38,7 +40,9 @@ public class VersionedValue {
@Override
public
String
toString
()
{
return
"VersionedValue [value="
+
Arrays
.
toString
(
value
)
+
", version="
+
version
+
"]"
;
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"version"
,
version
)
.
add
(
"value"
,
Arrays
.
toString
(
value
))
.
toString
();
}
}
...
...
core/store/dist/src/main/java/org/onlab/onos/store/service/WriteRequest.java
View file @
5e1cfe0
...
...
@@ -4,6 +4,8 @@ import static com.google.common.base.Preconditions.checkArgument;
import
java.util.Objects
;
import
com.google.common.base.MoreObjects
;
/**
* Database write request.
*/
...
...
@@ -67,10 +69,13 @@ public class WriteRequest {
@Override
public
String
toString
()
{
return
"WriteRequest [tableName="
+
tableName
+
", key="
+
key
+
", newValue="
+
newValue
+
", previousVersion="
+
previousVersion
+
", oldValue="
+
oldValue
;
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"tableName"
,
tableName
)
.
add
(
"key"
,
key
)
.
add
(
"newValue"
,
newValue
)
.
add
(
"previousVersion"
,
previousVersion
)
.
add
(
"oldValue"
,
oldValue
)
.
toString
();
}
@Override
...
...
core/store/dist/src/main/java/org/onlab/onos/store/service/WriteResult.java
View file @
5e1cfe0
package
org
.
onlab
.
onos
.
store
.
service
;
import
com.google.common.base.MoreObjects
;
/**
* Database write result.
...
...
@@ -27,4 +29,13 @@ public class WriteResult {
public
VersionedValue
previousValue
()
{
return
previousValue
;
}
@Override
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"tableName"
,
tableName
)
.
add
(
"key"
,
key
)
.
add
(
"previousValue"
,
previousValue
)
.
toString
();
}
}
...
...
Please
register
or
login
to post a comment