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-05 18:18:08 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cea3ba18dc9eb17aa4d6a0dcc9ffeb2eb6439916
cea3ba18
1 parent
4248bee8
add Factory method to ReadRequest
Change-Id: I713b25ff6165b072e647be0dfa63eab97dc5ca85
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 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/ReadRequest.java
View file @
cea3ba1
package
org
.
onlab
.
onos
.
store
.
service
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkNotNull
;
import
com.google.common.base.MoreObjects
;
/**
...
...
@@ -10,9 +12,22 @@ public class ReadRequest {
private
final
String
tableName
;
private
final
String
key
;
/**
* Creates a read request,
* which will retrieve the specified key from the table.
*
* @param tableName name of the table
* @param key key in the table
* @return ReadRequest
*/
public
static
ReadRequest
get
(
String
tableName
,
String
key
)
{
return
new
ReadRequest
(
tableName
,
key
);
}
public
ReadRequest
(
String
tableName
,
String
key
)
{
this
.
tableName
=
tableName
;
this
.
key
=
key
;
this
.
tableName
=
checkNotNull
(
tableName
)
;
this
.
key
=
checkNotNull
(
key
)
;
}
/**
...
...
Please
register
or
login
to post a comment