Tabnine Logo
Tracker.apply
Code IndexAdd Tabnine to your IDE (free)

How to use
apply
method
in
org.apache.cassandra.db.lifecycle.Tracker

Best Java code snippets using org.apache.cassandra.db.lifecycle.Tracker.apply (Showing top 20 results out of 315)

origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

Throwable apply(Function<View, View> function, Throwable accumulate)
{
  try
  {
    apply(function);
  }
  catch (Throwable t)
  {
    accumulate = merge(accumulate, t);
  }
  return accumulate;
}
origin: org.apache.cassandra/cassandra-all

Throwable apply(Function<View, View> function, Throwable accumulate)
{
  try
  {
    apply(function);
  }
  catch (Throwable t)
  {
    accumulate = merge(accumulate, t);
  }
  return accumulate;
}
origin: jsevellec/cassandra-unit

public void markFlushing(Memtable memtable)
{
  apply(View.markFlushing(memtable));
}
origin: jsevellec/cassandra-unit

Throwable apply(Function<View, View> function, Throwable accumulate)
{
  try
  {
    apply(function);
  }
  catch (Throwable t)
  {
    accumulate = merge(accumulate, t);
  }
  return accumulate;
}
origin: org.apache.cassandra/cassandra-all

  @VisibleForTesting
  public void removeUnsafe(Set<SSTableReader> toRemove)
  {
    Pair<View, View> result = apply(view -> {
      return updateLiveSet(toRemove, emptySet()).apply(view);
    });
  }
}
origin: jsevellec/cassandra-unit

  @VisibleForTesting
  public void removeUnsafe(Set<SSTableReader> toRemove)
  {
    Pair<View, View> result = apply(view -> {
      return updateLiveSet(toRemove, emptySet()).apply(view);
    });
  }
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: org.apache.cassandra/cassandra-all

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: jsevellec/cassandra-unit

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * @return a Transaction over the provided sstables if we are able to mark the given @param sstables as compacted, before anyone else
 */
public LifecycleTransaction tryModify(Iterable<SSTableReader> sstables, OperationType operationType)
{
  if (Iterables.isEmpty(sstables))
    return new LifecycleTransaction(this, operationType, sstables);
  if (null == apply(permitCompacting(sstables), updateCompacting(emptySet(), sstables)))
    return null;
  return new LifecycleTransaction(this, operationType, sstables);
}
origin: org.apache.cassandra/cassandra-all

/**
 * @return a Transaction over the provided sstables if we are able to mark the given @param sstables as compacted, before anyone else
 */
public LifecycleTransaction tryModify(Iterable<SSTableReader> sstables, OperationType operationType)
{
  if (Iterables.isEmpty(sstables))
    return new LifecycleTransaction(this, operationType, sstables);
  if (null == apply(permitCompacting(sstables), updateCompacting(emptySet(), sstables)))
    return null;
  return new LifecycleTransaction(this, operationType, sstables);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

/**
 * @return a Transaction over the provided sstables if we are able to mark the given @param sstables as compacted, before anyone else
 */
public LifecycleTransaction tryModify(Iterable<SSTableReader> sstables, OperationType operationType)
{
  if (Iterables.isEmpty(sstables))
    return new LifecycleTransaction(this, operationType, sstables);
  if (null == apply(permitCompacting(sstables), updateCompacting(emptySet(), sstables)))
    return null;
  return new LifecycleTransaction(this, operationType, sstables);
}
origin: jsevellec/cassandra-unit

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: org.apache.cassandra/cassandra-all

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: jsevellec/cassandra-unit

/**
 * @return a Transaction over the provided sstables if we are able to mark the given @param sstables as compacted, before anyone else
 */
public LifecycleTransaction tryModify(Iterable<SSTableReader> sstables, OperationType operationType)
{
  if (Iterables.isEmpty(sstables))
    return new LifecycleTransaction(this, operationType, sstables);
  if (null == apply(permitCompacting(sstables), updateCompacting(emptySet(), sstables)))
    return null;
  return new LifecycleTransaction(this, operationType, sstables);
}
origin: org.apache.cassandra/cassandra-all

public void addInitialSSTables(Iterable<SSTableReader> sstables)
{
  if (!isDummy())
    setupOnline(sstables);
  apply(updateLiveSet(emptySet(), sstables));
  maybeFail(updateSizeTracking(emptySet(), sstables, null));
  // no notifications or backup necessary
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public void addInitialSSTables(Iterable<SSTableReader> sstables)
{
  if (!isDummy())
    setupOnline(sstables);
  apply(updateLiveSet(emptySet(), sstables));
  maybeFail(updateSizeTracking(emptySet(), sstables, null));
  // no notifications or backup necessary
}
origin: jsevellec/cassandra-unit

public void addInitialSSTables(Iterable<SSTableReader> sstables)
{
  if (!isDummy())
    setupOnline(sstables);
  apply(updateLiveSet(emptySet(), sstables));
  maybeFail(updateSizeTracking(emptySet(), sstables, null));
  // no notifications or backup necessary
}
org.apache.cassandra.db.lifecycleTrackerapply

Javadoc

atomically tests permit against the view and applies function to it, if permit yields true, returning the original; otherwise the method aborts, returning null

Popular methods of Tracker

  • tryModify
  • <init>
  • addInitialSSTables
  • dropSSTables
  • dropSSTablesIfInvalid
  • emptySet
  • isDummy
  • updateSizeTracking
  • addSSTables
  • getCompacting
  • getMemtableFor
    get the Memtable that the ordered writeOp should be directed to
  • getUncompacting
  • getMemtableFor,
  • getUncompacting,
  • getView,
  • markFlushing,
  • maybeIncrementallyBackup,
  • notify,
  • notifyAdded,
  • notifyDeleting,
  • notifyDiscarded

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • findViewById (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Top Sublime Text plugins
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