Created
August 29, 2014 08:33
-
-
Save weilliu/209df6ce34bbca890d3e to your computer and use it in GitHub Desktop.
1.4 future
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (dsIter.hasNext()) { | |
Entry<String,String> kv = dsIter.next(); | |
schema.addProperty(Strings.V_KIDENT, kv.getKey()); | |
schema.addProperty(Strings.V_KSEQ, ii); | |
String value = JsonHelper.gs.toJson(schema); | |
OperationFuture<Boolean> ft = sdkHandle.set(kv.getKey(), 0, value); | |
cmdList.add(ft); | |
ii++; | |
} | |
int n_exc = 0; | |
for (OperationFuture<Boolean> ft : cmdList ) { | |
CommandResult res = new CommandResult(1); | |
try { | |
ft.get(); | |
res.setCode(ft.getStatus()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment