congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PartitionPosition.getToken
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Best plugins for Eclipse
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