congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
co.cask.tephra.visibility
Code IndexAdd Tabnine to your IDE (free)

How to use co.cask.tephra.visibility

Best Java code snippets using co.cask.tephra.visibility (Showing top 8 results out of 315)

origin: caskdata/tephra

/**
 * Used by a reader to get a fence that can be added to its transaction context.
 *
 * @param fenceId uniquely identifies the data that this fence is used to synchronize.
 *                  If the data is a table cell then this id can be composed of the table name, row key
 *                  and column key for the data.
 * @return {@link TransactionAware} to be added to reader's transaction context.
 */
public static TransactionAware create(byte[] fenceId) {
 return new ReadFence(fenceId);
}
origin: co.cask.tephra/tephra-core

 /**
  * Used by a writer to wait on a fence so that changes are visible to all readers with in-progress transactions.
  *
  * @param fenceId uniquely identifies the data that this fence is used to synchronize.
  *                  If the data is a table cell then this id can be composed of the table name, row key
  *                  and column key for the data.
  * @return {@link FenceWait} object
  */
 public static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient)
  throws TransactionFailureException, InterruptedException, TimeoutException {
  return new DefaultFenceWait(new TransactionContext(txClient, new WriteFence(fenceId)));
 }
}
origin: caskdata/tephra

                             VisibilityFence.create(fenceId));
fence1.start();
 FenceWait fenceWait = VisibilityFence.prepareWait(fenceId, customTxClient);
 fenceWait.await(timeout, timeUnit);
 Assert.fail("Expected await to fail");
} catch (TimeoutException e) {
FenceWait fenceWait = VisibilityFence.prepareWait(fenceId, customTxClient);
fenceWait.await(timeout, timeUnit);
Assert.assertEquals(2, attempts.get());
origin: caskdata/tephra

TransactionAware readFenceCase16 = VisibilityFence.create(fenceId);
TransactionContext readTxContextCase16 =
 new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase16);
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);
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);
assertTxnConflict(writeTxContext);
writeTxContext.start();
TransactionAware readFenceCase21 = VisibilityFence.create(fenceId);
TransactionContext readTxContextCase21 =
 new TransactionContext(new InMemoryTxSystemClient(txManager), readFenceCase21);
readTxContextCase21.start();
origin: caskdata/tephra

TransactionAware readFence1 = VisibilityFence.create(fenceId);
TransactionContext readTxContext1 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFence1);
readTxContext1.start();
TransactionAware readFence2 = VisibilityFence.create(fenceId);
TransactionContext readTxContext2 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFence2);
readTxContext2.start();
TransactionAware readFence3 = VisibilityFence.create(fenceId);
TransactionContext readTxContext3 = new TransactionContext(new InMemoryTxSystemClient(txManager), readFence3);
readTxContext3.start();
TransactionAware writeFence = new WriteFence(fenceId);
TransactionContext writeTxContext = new TransactionContext(new InMemoryTxSystemClient(txManager), writeFence);
writeTxContext.start();
origin: caskdata/tephra

 /**
  * Used by a writer to wait on a fence so that changes are visible to all readers with in-progress transactions.
  *
  * @param fenceId uniquely identifies the data that this fence is used to synchronize.
  *                  If the data is a table cell then this id can be composed of the table name, row key
  *                  and column key for the data.
  * @return {@link FenceWait} object
  */
 public static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient)
  throws TransactionFailureException, InterruptedException, TimeoutException {
  return new DefaultFenceWait(new TransactionContext(txClient, new WriteFence(fenceId)));
 }
}
origin: caskdata/tephra

                          VisibilityFence.create(fenceId));
fence1.start();
final TransactionContext fence2 = new TransactionContext(new InMemoryTxSystemClient(txManager),
                          VisibilityFence.create(fenceId));
fence2.start();
TransactionContext fence3 = new TransactionContext(new InMemoryTxSystemClient(txManager),
                          VisibilityFence.create(fenceId));
fence3.start();
FenceWait fenceWait = VisibilityFence.prepareWait(fenceId, customTxClient);
fenceWait.await(1000, TimeUnit.MILLISECONDS);
Assert.assertEquals(3, attempts.get());
origin: co.cask.tephra/tephra-core

/**
 * Used by a reader to get a fence that can be added to its transaction context.
 *
 * @param fenceId uniquely identifies the data that this fence is used to synchronize.
 *                  If the data is a table cell then this id can be composed of the table name, row key
 *                  and column key for the data.
 * @return {@link TransactionAware} to be added to reader's transaction context.
 */
public static TransactionAware create(byte[] fenceId) {
 return new ReadFence(fenceId);
}
co.cask.tephra.visibility

Most used classes

  • WriteFence
    Implementation used by FenceWait to wait for a VisibilityFence.
  • DefaultFenceWait
    Default implementation of FenceWait.
  • FenceWait
    Used by a writer to wait on a fence so that changes are visible to all readers with in-progress tran
  • ReadFence
    Implementation of VisibilityFence used by reader.
  • VisibilityFence
    VisibilityFence is used to ensure that after a given point in time, all readers see an updated chang
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now