@Test public void testFence1() throws Exception { byte[] fenceId = "test_table".getBytes(Charsets.UTF_8); TransactionAware readFenceCase16 = VisibilityFence.create(fenceId); TransactionContext readTxContextCase16 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase16); readTxContextCase16.start(); readTxContextCase16.finish(); TransactionAware readFenceCase17 = VisibilityFence.create(fenceId); TransactionContext readTxContextCase17 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase17); readTxContextCase17.start(); TransactionAware readFenceCase18 = VisibilityFence.create(fenceId); TransactionContext readTxContextCase18 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase18); readTxContextCase18.start(); TransactionAware writeFence = new WriteFence(fenceId); TransactionContext writeTxContext = new TransactionContext(new InMemoryTxSystemClient(txManager), writeFence); writeTxContext.start(); TransactionAware readFenceCase20 = VisibilityFence.create(fenceId); TransactionContext readTxContextCase20 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase20); readTxContextCase20.start(); readTxContextCase17.finish(); assertTxnConflict(writeTxContext); writeTxContext.start(); writeTxContext.finish(); TransactionAware readFenceCase21 = VisibilityFence.create(fenceId); TransactionContext readTxContextCase21 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase21); readTxContextCase21.start(); assertTxnConflict(readTxContextCase18); readTxContextCase20.finish(); readTxContextCase21.finish(); }
public static TransactionAware create(byte[] fenceId) { return new ReadFence(fenceId); }
VisibilityFence { public static TransactionAware create(byte[] fenceId) { return new ReadFence(fenceId); } }
VisibilityFence { public static TransactionAware create(byte[] fenceId) { return new ReadFence(fenceId); } private  VisibilityFence(); }
VisibilityFence { public static TransactionAware create(byte[] fenceId) { return new ReadFence(fenceId); } private  VisibilityFence(); static TransactionAware create(byte[] fenceId); static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient); }
VisibilityFence { public static TransactionAware create(byte[] fenceId) { return new ReadFence(fenceId); } private  VisibilityFence(); static TransactionAware create(byte[] fenceId); static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient);  }