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-10 12:24:11 -0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
8072af886236137beda1d5426b41dc0ecbf9b02e
8072af88
2 parents
13efefa0
b2ab0912
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseClient.java
core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseClient.java
View file @
8072af8
...
...
@@ -39,7 +39,12 @@ public class DatabaseClient {
Arrays
.
asList
(
tableName
));
CompletableFuture
<
SubmitResponse
>
future
=
client
.
submit
(
request
);
try
{
return
(
boolean
)
future
.
get
().
result
();
final
SubmitResponse
submitResponse
=
future
.
get
();
if
(
submitResponse
.
status
()
==
Status
.
OK
)
{
return
(
boolean
)
submitResponse
.
result
();
}
else
{
throw
new
DatabaseException
(
submitResponse
.
error
());
}
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
throw
new
DatabaseException
(
e
);
}
...
...
@@ -54,7 +59,7 @@ public class DatabaseClient {
Arrays
.
asList
(
tableName
));
CompletableFuture
<
SubmitResponse
>
future
=
client
.
submit
(
request
);
try
{
if
(
future
.
get
().
status
()
=
=
Status
.
OK
)
{
if
(
future
.
get
().
status
()
!
=
Status
.
OK
)
{
throw
new
DatabaseException
(
future
.
get
().
toString
());
}
...
...
@@ -90,7 +95,12 @@ public class DatabaseClient {
Arrays
.
asList
());
CompletableFuture
<
SubmitResponse
>
future
=
client
.
submit
(
request
);
try
{
return
(
List
<
String
>)
future
.
get
().
result
();
final
SubmitResponse
submitResponse
=
future
.
get
();
if
(
submitResponse
.
status
()
==
Status
.
OK
)
{
return
(
List
<
String
>)
submitResponse
.
result
();
}
else
{
throw
new
DatabaseException
(
submitResponse
.
error
());
}
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
throw
new
DatabaseException
(
e
);
}
...
...
@@ -106,8 +116,12 @@ public class DatabaseClient {
CompletableFuture
<
SubmitResponse
>
future
=
client
.
submit
(
request
);
try
{
List
<
InternalReadResult
>
internalReadResults
=
(
List
<
InternalReadResult
>)
future
.
get
().
result
();
return
internalReadResults
;
final
SubmitResponse
submitResponse
=
future
.
get
();
if
(
submitResponse
.
status
()
==
Status
.
OK
)
{
return
(
List
<
InternalReadResult
>)
submitResponse
.
result
();
}
else
{
throw
new
DatabaseException
(
submitResponse
.
error
());
}
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
throw
new
DatabaseException
(
e
);
}
...
...
@@ -123,8 +137,12 @@ public class DatabaseClient {
CompletableFuture
<
SubmitResponse
>
future
=
client
.
submit
(
request
);
try
{
List
<
InternalWriteResult
>
internalWriteResults
=
(
List
<
InternalWriteResult
>)
future
.
get
().
result
();
return
internalWriteResults
;
final
SubmitResponse
submitResponse
=
future
.
get
();
if
(
submitResponse
.
status
()
==
Status
.
OK
)
{
return
(
List
<
InternalWriteResult
>)
submitResponse
.
result
();
}
else
{
throw
new
DatabaseException
(
submitResponse
.
error
());
}
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
throw
new
DatabaseException
(
e
);
}
...
...
Please
register
or
login
to post a comment