Codota Logo
PartitionPosition.getToken
Code IndexAdd Codota to your IDE (free)

How to use
getToken
method
in
org.apache.cassandra.db.PartitionPosition

Best Java code snippets using org.apache.cassandra.db.PartitionPosition.getToken (Showing top 18 results out of 315)

  • Common ways to obtain PartitionPosition
private void myMethod () {
PartitionPosition p =
  • Codota IconToken token;token.maxKeyBound()
  • Codota IconToken token;token.minKeyBound()
  • Codota IconDecoratedKey decoratedKey;decoratedKey.getToken().minKeyBound()
  • Smart code suggestions by Codota
}
origin: jsevellec/cassandra-unit

public int compareTo(PartitionPosition pos)
{
  if (this == pos)
    return 0;
  int cmp = getToken().compareTo(pos.getToken());
  if (cmp != 0)
    return cmp;
  if (isMinimumBound)
    return ((pos instanceof KeyBound) && ((KeyBound)pos).isMinimumBound) ? 0 : -1;
  else
    return ((pos instanceof KeyBound) && !((KeyBound)pos).isMinimumBound) ? 0 : 1;
}
origin: com.strapdata.cassandra/cassandra-all

public int compareTo(PartitionPosition pos)
{
  if (this == pos)
    return 0;
  int cmp = getToken().compareTo(pos.getToken());
  if (cmp != 0)
    return cmp;
  if (isMinimumBound)
    return ((pos instanceof KeyBound) && ((KeyBound)pos).isMinimumBound) ? 0 : -1;
  else
    return ((pos instanceof KeyBound) && !((KeyBound)pos).isMinimumBound) ? 0 : 1;
}
origin: org.apache.cassandra/cassandra-all

public int compareTo(PartitionPosition pos)
{
  if (this == pos)
    return 0;
  int cmp = getToken().compareTo(pos.getToken());
  if (cmp != 0)
    return cmp;
  if (isMinimumBound)
    return ((pos instanceof KeyBound) && ((KeyBound)pos).isMinimumBound) ? 0 : -1;
  else
    return ((pos instanceof KeyBound) && !((KeyBound)pos).isMinimumBound) ? 0 : 1;
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public int compareTo(PartitionPosition pos)
{
  if (this == pos)
    return 0;
  int cmp = getToken().compareTo(pos.getToken());
  if (cmp != 0)
    return cmp;
  if (isMinimumBound)
    return ((pos instanceof KeyBound) && ((KeyBound)pos).isMinimumBound) ? 0 : -1;
  else
    return ((pos instanceof KeyBound) && !((KeyBound)pos).isMinimumBound) ? 0 : 1;
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

  public long serializedSize(PartitionPosition pos, int version)
  {
    Kind kind = pos.kind();
    int size = 1; // 1 byte for enum
    if (kind == Kind.ROW_KEY)
    {
      int keySize = ((DecoratedKey)pos).getKey().remaining();
      size += TypeSizes.sizeof((short) keySize) + keySize;
    }
    else
    {
      size += Token.serializer.serializedSize(pos.getToken(), version);
    }
    return size;
  }
}
origin: com.strapdata.cassandra/cassandra-all

  public long serializedSize(PartitionPosition pos, int version)
  {
    Kind kind = pos.kind();
    int size = 1; // 1 byte for enum
    if (kind == Kind.ROW_KEY)
    {
      int keySize = ((DecoratedKey)pos).getKey().remaining();
      size += TypeSizes.sizeof((short) keySize) + keySize;
    }
    else
    {
      size += Token.serializer.serializedSize(pos.getToken(), version);
    }
    return size;
  }
}
origin: org.apache.cassandra/cassandra-all

  public long serializedSize(PartitionPosition pos, int version)
  {
    Kind kind = pos.kind();
    int size = 1; // 1 byte for enum
    if (kind == Kind.ROW_KEY)
    {
      int keySize = ((DecoratedKey)pos).getKey().remaining();
      size += TypeSizes.sizeof((short) keySize) + keySize;
    }
    else
    {
      size += Token.serializer.serializedSize(pos.getToken(), version);
    }
    return size;
  }
}
origin: jsevellec/cassandra-unit

  public long serializedSize(PartitionPosition pos, int version)
  {
    Kind kind = pos.kind();
    int size = 1; // 1 byte for enum
    if (kind == Kind.ROW_KEY)
    {
      int keySize = ((DecoratedKey)pos).getKey().remaining();
      size += TypeSizes.sizeof((short) keySize) + keySize;
    }
    else
    {
      size += Token.serializer.serializedSize(pos.getToken(), version);
    }
    return size;
  }
}
origin: jsevellec/cassandra-unit

public ResultIterator(Operation operationTree, QueryController controller, ReadExecutionController executionController)
{
  this.keyRange = controller.dataRange().keyRange();
  this.operationTree = operationTree;
  this.controller = controller;
  this.executionController = executionController;
  if (operationTree != null)
    operationTree.skipTo((Long) keyRange.left.getToken().getTokenValue());
}
origin: org.apache.cassandra/cassandra-all

public ResultIterator(Operation operationTree, QueryController controller, ReadExecutionController executionController)
{
  this.keyRange = controller.dataRange().keyRange();
  this.operationTree = operationTree;
  this.controller = controller;
  this.executionController = executionController;
  if (operationTree != null)
    operationTree.skipTo((Long) keyRange.left.getToken().getTokenValue());
}
origin: com.strapdata.cassandra/cassandra-all

public ResultIterator(Operation operationTree, QueryController controller, ReadExecutionController executionController)
{
  this.keyRange = controller.dataRange().keyRange();
  this.operationTree = operationTree;
  this.controller = controller;
  this.executionController = executionController;
  if (operationTree != null)
    operationTree.skipTo((Long) keyRange.left.getToken().getTokenValue());
}
origin: org.apache.cassandra/cassandra-all

if (firstCompactingKey == null || lastCompactingKey == null || overlapping(firstCompactingKey.getToken(), lastCompactingKey.getToken(), Arrays.asList(newCandidate)).size() == 0)
  candidates.add(newCandidate);
remaining.remove(newCandidate);
origin: com.strapdata.cassandra/cassandra-all

if (firstCompactingKey == null || lastCompactingKey == null || overlapping(firstCompactingKey.getToken(), lastCompactingKey.getToken(), Arrays.asList(newCandidate)).size() == 0)
  candidates.add(newCandidate);
remaining.remove(newCandidate);
origin: org.apache.cassandra/cassandra-all

public void serialize(PartitionPosition pos, DataOutputPlus out, int version) throws IOException
{
  Kind kind = pos.kind();
  out.writeByte(kind.ordinal());
  if (kind == Kind.ROW_KEY)
    ByteBufferUtil.writeWithShortLength(((DecoratedKey)pos).getKey(), out);
  else
    Token.serializer.serialize(pos.getToken(), out, version);
}
origin: jsevellec/cassandra-unit

public void serialize(PartitionPosition pos, DataOutputPlus out, int version) throws IOException
{
  Kind kind = pos.kind();
  out.writeByte(kind.ordinal());
  if (kind == Kind.ROW_KEY)
    ByteBufferUtil.writeWithShortLength(((DecoratedKey)pos).getKey(), out);
  else
    Token.serializer.serialize(pos.getToken(), out, version);
}
origin: com.strapdata.cassandra/cassandra-all

public void serialize(PartitionPosition pos, DataOutputPlus out, int version) throws IOException
{
  Kind kind = pos.kind();
  out.writeByte(kind.ordinal());
  if (kind == Kind.ROW_KEY)
    ByteBufferUtil.writeWithShortLength(((DecoratedKey)pos).getKey(), out);
  else
    Token.serializer.serialize(pos.getToken(), out, version);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public void serialize(PartitionPosition pos, DataOutputPlus out, int version) throws IOException
{
  Kind kind = pos.kind();
  out.writeByte(kind.ordinal());
  if (kind == Kind.ROW_KEY)
    ByteBufferUtil.writeWithShortLength(((DecoratedKey)pos).getKey(), out);
  else
    Token.serializer.serialize(pos.getToken(), out, version);
}
origin: jsevellec/cassandra-unit

if (firstCompactingKey == null || lastCompactingKey == null || overlapping(firstCompactingKey.getToken(), lastCompactingKey.getToken(), Arrays.asList(newCandidate)).size() == 0)
  candidates.add(newCandidate);
remaining.remove(newCandidate);
org.apache.cassandra.dbPartitionPositiongetToken

Popular methods of PartitionPosition

  • isMinimum
  • compareTo
  • kind

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now