}
public void run() throws ExecutionException, InterruptedException {
switch (SCENARIO.testGenEvent) {
case test:
final Store store = Grid.getInstance().store();
if (i == 1) {
StoreTransaction tx = store.beginTransaction();
try {
long root = store.getRoot("root", tx);
byte buf[] = null;//"hello".getBytes();
store.set(root, buf, tx);
store.commit(tx);
} catch (TimeoutException ex) {
throw new RuntimeException("set failed");
}
Thread.sleep(20000);
} else {
StoreTransaction tx = store.beginTransaction();
byte[] get;
try {
long root = store.getRoot("root", tx);
get = store.get(root);
store.commit(tx);
} catch (TimeoutException ex) {
throw new RuntimeException("get failed");
}
System.out.println(get);
}