A transaction can be used by more than one thread. @return A newly created transaction.
123124125126127128129130131132133
} private <Message> Actor<Message> getRootFromStoreAndUpdateCache(final String rootName) throws SuspendExecution, RuntimeException { final Store store = grid.store(); StoreTransaction txn = store.beginTransaction(); try { boolean error = false; try { final long root = store.getRoot(rootName, txn); byte[] buf = store.get(root);
5354555657585960616263
final String rootName = actor.getName(); LOG.info("Registering actor {} at root {}", actor, rootName); final Store store = grid.store(); StoreTransaction txn = store.beginTransaction(); serlock.lock(); try { try { final long root = store.getRoot(rootName, txn); store.getx(root, txn);
8586878889909192939495
LOG.info("Uregistering {}", rootName); final Store store = grid.store(); StoreTransaction txn = store.beginTransaction(); try { try { final long root = store.getRoot(rootName, txn); store.set(root, (byte[]) null, txn); store.commit(txn);
} private <Message> ActorRef<Message> getRootFromStoreAndUpdateCache(final String rootName) throws SuspendExecution, RuntimeException { final Store store = grid.store(); StoreTransaction txn = store.beginTransaction(); try { boolean error = false; try { final long root = store.getRoot(rootName, txn); byte[] buf = store.get(root);