test_class.declarator: exporter
test_class.modifier: private
test_class.original_string: private Exporter                  exporter;
test_class.type: Exporter
test_class.var_name: exporter
test_class.declarator: st
test_class.modifier: private
test_class.original_string: private ServerTransactionListener st;
test_class.type: ServerTransactionListener
test_class.var_name: st
test_class.declarator: executor
test_class.modifier: private
test_class.original_string: private ExecutorService           executor;
test_class.type: ExecutorService
test_class.var_name: executor
test_class.declarator: con
test_class.modifier: private
test_class.original_string: private BlobStoreConnection       con;
test_class.type: BlobStoreConnection
test_class.var_name: con
test_class.file: akubra-rmi/src/test/java/org/akubraproject/rmi/server/ServerTransactionListenerTest.java
test_class.identifier: ServerTransactionListenerTest
test_case.body: @Test
    public void testRegisterSynchronization() throws Exception {
      final Synchronization sync   = createMock(Synchronization.class);
  
      Future<Void>          future =
        executor.submit(new Callable<Void>() {
            public Void call() throws Exception {
              st.registerSynchronization(sync);
  
              return null;
            }
          });
  
      Operation<?> op              = st.getNextOperation();
      assertTrue(op instanceof RegisterSynchronization);
  
      RemoteSynchronization rsync = ((RegisterSynchronization) op).getSynchronization();
      assertTrue(rsync instanceof ServerSynchronization);
      assertEquals(sync, ((ServerSynchronization) rsync).getSynchronization());
      st.postResult(new Result<Void>());
  
      assertNull(future.get());
    }
test_case.class_method_signature: ServerTransactionListenerTest.testRegisterSynchronization()
test_case.full_signature: @Test public void testRegisterSynchronization()
test_case.identifier: testRegisterSynchronization
test_case.invocations: createMock submit registerSynchronization getNextOperation assertTrue getSynchronization assertTrue assertEquals getSynchronization postResult assertNull get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegisterSynchronization()
focal_class.declarator: log              = LoggerFactory.getLogger(ServerTransactionListener.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger  log              = LoggerFactory.getLogger(ServerTransactionListener.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: operations    = new SynchronousQueue<Operation<?>>()
focal_class.modifier: private final
focal_class.original_string: private final SynchronousQueue<Operation<?>> operations    = new SynchronousQueue<Operation<?>>();
focal_class.type: SynchronousQueue<Operation<?>>
focal_class.var_name: operations
focal_class.declarator: results       = new SynchronousQueue<Result<?>>()
focal_class.modifier: private final
focal_class.original_string: private final SynchronousQueue<Result<?>>    results       = new SynchronousQueue<Result<?>>();
focal_class.type: SynchronousQueue<Result<?>>
focal_class.var_name: results
focal_class.declarator: xas = new HashMap<XAResource, ServerXAResource>()
focal_class.modifier: private final
focal_class.original_string: private final Map<XAResource, ServerXAResource> xas = new HashMap<XAResource, ServerXAResource>();
focal_class.type: Map<XAResource, ServerXAResource>
focal_class.var_name: xas
focal_class.file: akubra-rmi/src/main/java/org/akubraproject/rmi/server/ServerTransactionListener.java
focal_class.identifier: ServerTransactionListener
focal_class.interfaces: implements Transaction, RemoteTransactionListener
focal_class.class_method_signature: ServerTransactionListener.ServerTransactionListener(final BlobStore store, final Map<String, String> hints,
                                     Exporter exporter)
focal_class.full_signature: public  ServerTransactionListener(final BlobStore store, final Map<String, String> hints,
                                     Exporter exporter)
focal_class.identifier: ServerTransactionListener
focal_class.modifiers: public
focal_class.parameters: (final BlobStore store, final Map<String, String> hints,
                                     Exporter exporter)
focal_class.signature:  ServerTransactionListener(final BlobStore store, final Map<String, String> hints,
                                     Exporter exporter)
focal_class.class_method_signature: ServerTransactionListener.openConnection(BlobStore store, Map<String, String> hints)
focal_class.full_signature: private void openConnection(BlobStore store, Map<String, String> hints)
focal_class.identifier: openConnection
focal_class.modifiers: private
focal_class.parameters: (BlobStore store, Map<String, String> hints)
focal_class.return: void
focal_class.signature: void openConnection(BlobStore store, Map<String, String> hints)
focal_class.class_method_signature: ServerTransactionListener.getNextOperation()
focal_class.full_signature: public Operation<?> getNextOperation()
focal_class.identifier: getNextOperation
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Operation<?>
focal_class.signature: Operation<?> getNextOperation()
focal_class.class_method_signature: ServerTransactionListener.postResult(Result<?> result)
focal_class.full_signature: public void postResult(Result<?> result)
focal_class.identifier: postResult
focal_class.modifiers: public
focal_class.parameters: (Result<?> result)
focal_class.return: void
focal_class.signature: void postResult(Result<?> result)
focal_class.class_method_signature: ServerTransactionListener.executeOnClient(Operation<T> operation)
focal_class.full_signature: @SuppressWarnings("unchecked") private T executeOnClient(Operation<T> operation)
focal_class.identifier: executeOnClient
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (Operation<T> operation)
focal_class.return: T
focal_class.signature: T executeOnClient(Operation<T> operation)
focal_class.class_method_signature: ServerTransactionListener.commit()
focal_class.full_signature: public void commit()
focal_class.identifier: commit
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commit()
focal_class.class_method_signature: ServerTransactionListener.delistResource(XAResource xaRes, int flags)
focal_class.full_signature: public boolean delistResource(XAResource xaRes, int flags)
focal_class.identifier: delistResource
focal_class.modifiers: public
focal_class.parameters: (XAResource xaRes, int flags)
focal_class.return: boolean
focal_class.signature: boolean delistResource(XAResource xaRes, int flags)
focal_class.class_method_signature: ServerTransactionListener.enlistResource(XAResource xaRes)
focal_class.full_signature: public boolean enlistResource(XAResource xaRes)
focal_class.identifier: enlistResource
focal_class.modifiers: public
focal_class.parameters: (XAResource xaRes)
focal_class.return: boolean
focal_class.signature: boolean enlistResource(XAResource xaRes)
focal_class.class_method_signature: ServerTransactionListener.getStatus()
focal_class.full_signature: public int getStatus()
focal_class.identifier: getStatus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getStatus()
focal_class.class_method_signature: ServerTransactionListener.registerSynchronization(Synchronization sync)
focal_class.full_signature: public void registerSynchronization(Synchronization sync)
focal_class.identifier: registerSynchronization
focal_class.modifiers: public
focal_class.parameters: (Synchronization sync)
focal_class.return: void
focal_class.signature: void registerSynchronization(Synchronization sync)
focal_class.class_method_signature: ServerTransactionListener.rollback()
focal_class.full_signature: public void rollback()
focal_class.identifier: rollback
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rollback()
focal_class.class_method_signature: ServerTransactionListener.setRollbackOnly()
focal_class.full_signature: public void setRollbackOnly()
focal_class.identifier: setRollbackOnly
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setRollbackOnly()
focal_class.class_method_signature: ServerTransactionListener.getXAResource(RemoteXAResource res)
focal_class.full_signature: public XAResource getXAResource(RemoteXAResource res)
focal_class.identifier: getXAResource
focal_class.modifiers: public
focal_class.parameters: (RemoteXAResource res)
focal_class.return: XAResource
focal_class.signature: XAResource getXAResource(RemoteXAResource res)
focal_class.superclass: extends UnicastExportable
focal_method.body: public void registerSynchronization(Synchronization sync)
                                 throws RollbackException, IllegalStateException, SystemException {
      RemoteSynchronization rsync;
  
      try {
        rsync = new ServerSynchronization(sync, getExporter());
      } catch (RemoteException e) {
        throw (SystemException) new SystemException("Failed to export Synchronization").initCause(e);
      }
  
      try {
        executeOnClient(new RegisterSynchronization(rsync));
      } catch (ExecutionException e) {
        Throwable cause = e.getCause();
  
        if (cause instanceof RollbackException)
          throw (RollbackException) cause;
  
        if (cause instanceof SystemException)
          throw (SystemException) cause;
  
        if (cause instanceof RuntimeException)
          throw (RuntimeException) cause;
  
        throw new RuntimeException("Error reported by server", cause);
      }
    }
focal_method.class_method_signature: ServerTransactionListener.registerSynchronization(Synchronization sync)
focal_method.full_signature: public void registerSynchronization(Synchronization sync)
focal_method.identifier: registerSynchronization
focal_method.invocations: getExporter initCause executeOnClient getCause
focal_method.modifiers: public
focal_method.parameters: (Synchronization sync)
focal_method.return: void
focal_method.signature: void registerSynchronization(Synchronization sync)