Tabnine Logo
PartitionPosition.kind
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.cassandra/cassandra-all

public boolean isLimitedToOnePartition()
{
  return dataRange.keyRange instanceof Bounds
    && dataRange.startKey().kind() == PartitionPosition.Kind.ROW_KEY
    && dataRange.startKey().equals(dataRange.stopKey());
}
origin: jsevellec/cassandra-unit

public boolean isLimitedToOnePartition()
{
  return dataRange.keyRange instanceof Bounds
    && dataRange.startKey().kind() == PartitionPosition.Kind.ROW_KEY
    && dataRange.startKey().equals(dataRange.stopKey());
}
origin: com.strapdata.cassandra/cassandra-all

public boolean isLimitedToOnePartition()
{
  return dataRange.keyRange instanceof Bounds
    && dataRange.startKey().kind() == PartitionPosition.Kind.ROW_KEY
    && dataRange.startKey().equals(dataRange.stopKey());
}
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: 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: 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 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

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);
}
org.apache.cassandra.dbPartitionPositionkind

Popular methods of PartitionPosition

  • isMinimum
  • compareTo
  • getToken

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • CodeWhisperer alternatives
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