Tabnine Logo
CellPath.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
org.apache.cassandra.db.rows.CellPath

Best Java code snippets using org.apache.cassandra.db.rows.CellPath.create (Showing top 20 results out of 315)

origin: org.apache.cassandra/cassandra-all

public CellPath deserialize(DataInputPlus in) throws IOException
{
  return CellPath.create(ByteBufferUtil.readWithVIntLength(in));
}
origin: org.apache.cassandra/cassandra-all

public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec)
{
  Cell cell = data.getCell(indexedColumn, CellPath.create(indexValue));
  return cell == null || !cell.isLive(nowInSec);
}
origin: jsevellec/cassandra-unit

public CellPath cellPathForField(FieldIdentifier fieldName)
{
  // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements
  return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName)));
}
origin: org.apache.cassandra/cassandra-all

public CellPath cellPathForField(FieldIdentifier fieldName)
{
  // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements
  return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName)));
}
origin: jsevellec/cassandra-unit

public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec)
{
  Cell cell = data.getCell(indexedColumn, CellPath.create(indexValue));
  return cell == null || !cell.isLive(nowInSec);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public CellPath cellPathForField(FieldIdentifier fieldName)
{
  // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements
  return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName)));
}
origin: org.apache.cassandra/cassandra-all

public CellPath path()
{
  if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0)
    return null;
  long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH);
  int size = MemoryUtil.getInt(offset);
  return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN));
}
origin: jsevellec/cassandra-unit

public CellPath path()
{
  if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0)
    return null;
  long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH);
  int size = MemoryUtil.getInt(offset);
  return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN));
}
origin: org.apache.cassandra/cassandra-all

private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column)
{
  CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement);
  int ttl = getTtl(metadata, column);
  return ttl == LivenessInfo.NO_TTL
     ? BufferCell.live(name.column, column.timestamp, column.value, path)
     : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path);
}
origin: com.strapdata.cassandra/cassandra-all

public CellPath path()
{
  if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0)
    return null;
  long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH);
  int size = MemoryUtil.getInt(offset);
  return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN));
}
origin: com.strapdata.cassandra/cassandra-all

private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column)
{
  CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement);
  int ttl = getTtl(metadata, column);
  return ttl == LivenessInfo.NO_TTL
     ? BufferCell.live(name.column, column.timestamp, column.value, path)
     : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public CellPath path()
{
  if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0)
    return null;
  long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH);
  int size = MemoryUtil.getInt(offset);
  return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN));
}
origin: jsevellec/cassandra-unit

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set";
    Term.Terminal elt = t.bind(params.options);
    if (elt == null)
      throw new InvalidRequestException("Invalid null set element");
    params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion())));
  }
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set";
    Term.Terminal elt = t.bind(params.options);
    if (elt == null)
      throw new InvalidRequestException("Invalid null set element");
    params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion())));
  }
}
origin: org.apache.cassandra/cassandra-all

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set";
    Term.Terminal elt = t.bind(params.options);
    if (elt == null)
      throw new InvalidRequestException("Invalid null set element");
    params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion())));
  }
}
origin: com.strapdata.cassandra/cassandra-all

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set";
    Term.Terminal elt = t.bind(params.options);
    if (elt == null)
      throw new InvalidRequestException("Invalid null set element");
    params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion())));
  }
}
origin: org.apache.cassandra/cassandra-all

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map";
    Term.Terminal key = t.bind(params.options);
    if (key == null)
      throw new InvalidRequestException("Invalid null map key");
    if (key == Constants.UNSET_VALUE)
      throw new InvalidRequestException("Invalid unset map key");
    params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion())));
  }
}
origin: jsevellec/cassandra-unit

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map";
    Term.Terminal key = t.bind(params.options);
    if (key == null)
      throw new InvalidRequestException("Invalid null map key");
    if (key == Constants.UNSET_VALUE)
      throw new InvalidRequestException("Invalid unset map key");
    params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion())));
  }
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map";
    Term.Terminal key = t.bind(params.options);
    if (key == null)
      throw new InvalidRequestException("Invalid null map key");
    if (key == Constants.UNSET_VALUE)
      throw new InvalidRequestException("Invalid unset map key");
    params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion())));
  }
}
origin: com.strapdata.cassandra/cassandra-all

  public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException
  {
    assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map";
    Term.Terminal key = t.bind(params.options);
    if (key == null)
      throw new InvalidRequestException("Invalid null map key");
    if (key == Constants.UNSET_VALUE)
      throw new InvalidRequestException("Invalid unset map key");
    params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion())));
  }
}
org.apache.cassandra.db.rowsCellPathcreate

Popular methods of CellPath

  • get
  • size
  • copy
  • dataSize
  • digest
  • unsharedHeapSizeExcludingData

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JList (javax.swing)
  • From CI to AI: The AI layer in your organization
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