congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ListType.getSerializer
Code IndexAdd Tabnine to your IDE (free)

How to use
getSerializer
method
in
org.apache.cassandra.db.marshal.ListType

Best Java code snippets using org.apache.cassandra.db.marshal.ListType.getSerializer (Showing top 20 results out of 315)

origin: Impetus/Kundera

ListSerializer listSerializer = listType.getSerializer();
Collection outputCollection = new ArrayList();
if (useNativeProtocol2)
origin: jsevellec/cassandra-unit

public static Value fromSerialized(ByteBuffer value, ListType type, ProtocolVersion version) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but compose does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, version);
    List<ByteBuffer> elements = new ArrayList<>(l.size());
    for (Object element : l)
      // elements can be null in lists that represent a set of IN values
      elements.add(element == null ? null : type.getElementsType().decompose(element));
    return new Value(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public static Value fromSerialized(ByteBuffer value, ListType type, ProtocolVersion version) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but compose does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, version);
    List<ByteBuffer> elements = new ArrayList<>(l.size());
    for (Object element : l)
      // elements can be null in lists that represent a set of IN values
      elements.add(element == null ? null : type.getElementsType().decompose(element));
    return new Value(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: org.apache.cassandra/cassandra-all

public static Value fromSerialized(ByteBuffer value, ListType type, ProtocolVersion version) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but compose does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, version);
    List<ByteBuffer> elements = new ArrayList<>(l.size());
    for (Object element : l)
      // elements can be null in lists that represent a set of IN values
      elements.add(element == null ? null : type.getElementsType().decompose(element));
    return new Value(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.facebook.presto.cassandra/cassandra-server

public static Value fromSerialized(ByteBuffer value, ListType type, int version) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but compose does the validation (so we're fine).
    List<?> l = (List<?>)type.getSerializer().deserializeForNativeProtocol(value, version);
    List<ByteBuffer> elements = new ArrayList<ByteBuffer>(l.size());
    for (Object element : l)
      // elements can be null in lists that represent a set of IN values
      elements.add(element == null ? null : type.getElementsType().decompose(element));
    return new Value(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.strapdata.cassandra/cassandra-all

public static Value fromSerialized(ByteBuffer value, ListType type, ProtocolVersion version) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but compose does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, version);
    List<ByteBuffer> elements = new ArrayList<>(l.size());
    for (Object element : l)
      // elements can be null in lists that represent a set of IN values
      elements.add(element == null ? null : type.getElementsType().decompose(element));
    return new Value(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.facebook.presto.cassandra/cassandra-server

public static InValue fromSerialized(ByteBuffer value, ListType type, QueryOptions options) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but the deserialization does the validation (so we're fine).
    List<?> l = (List<?>)type.getSerializer().deserializeForNativeProtocol(value, options.getProtocolVersion());
    assert type.getElementsType() instanceof TupleType;
    TupleType tupleType = (TupleType) type.getElementsType();
    // type.split(bytes)
    List<List<ByteBuffer>> elements = new ArrayList<>(l.size());
    for (Object element : l)
      elements.add(Arrays.asList(tupleType.split(type.getElementsType().decompose(element))));
    return new InValue(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: org.apache.cassandra/cassandra-all

public static InValue fromSerialized(ByteBuffer value, ListType type, QueryOptions options) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but the deserialization does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, options.getProtocolVersion());
    assert type.getElementsType() instanceof TupleType;
    TupleType tupleType = Tuples.getTupleType(type.getElementsType());
    // type.split(bytes)
    List<List<ByteBuffer>> elements = new ArrayList<>(l.size());
    for (Object element : l)
      elements.add(Arrays.asList(tupleType.split(type.getElementsType().decompose(element))));
    return new InValue(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public static InValue fromSerialized(ByteBuffer value, ListType type, QueryOptions options) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but the deserialization does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, options.getProtocolVersion());
    assert type.getElementsType() instanceof TupleType;
    TupleType tupleType = (TupleType) type.getElementsType();
    // type.split(bytes)
    List<List<ByteBuffer>> elements = new ArrayList<>(l.size());
    for (Object element : l)
      elements.add(Arrays.asList(tupleType.split(type.getElementsType().decompose(element))));
    return new InValue(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: jsevellec/cassandra-unit

public static InValue fromSerialized(ByteBuffer value, ListType type, QueryOptions options) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but the deserialization does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, options.getProtocolVersion());
    assert type.getElementsType() instanceof TupleType;
    TupleType tupleType = Tuples.getTupleType(type.getElementsType());
    // type.split(bytes)
    List<List<ByteBuffer>> elements = new ArrayList<>(l.size());
    for (Object element : l)
      elements.add(Arrays.asList(tupleType.split(type.getElementsType().decompose(element))));
    return new InValue(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: com.strapdata.cassandra/cassandra-all

public static InValue fromSerialized(ByteBuffer value, ListType type, QueryOptions options) throws InvalidRequestException
{
  try
  {
    // Collections have this small hack that validate cannot be called on a serialized object,
    // but the deserialization does the validation (so we're fine).
    List<?> l = type.getSerializer().deserializeForNativeProtocol(value, options.getProtocolVersion());
    assert type.getElementsType() instanceof TupleType;
    TupleType tupleType = Tuples.getTupleType(type.getElementsType());
    // type.split(bytes)
    List<List<ByteBuffer>> elements = new ArrayList<>(l.size());
    for (Object element : l)
      elements.add(Arrays.asList(tupleType.split(type.getElementsType().decompose(element))));
    return new InValue(elements);
  }
  catch (MarshalException e)
  {
    throw new InvalidRequestException(e.getMessage());
  }
}
origin: jsevellec/cassandra-unit

  return type.compareForCQL(leftOperand, rightOperand) != 0;
case IN:
  List inValues = ((List) ListType.getInstance(type, false).getSerializer().deserialize(rightOperand));
  return inValues.contains(type.getSerializer().deserialize(leftOperand));
case CONTAINS:
origin: org.apache.cassandra/cassandra-all

  return type.compareForCQL(leftOperand, rightOperand) != 0;
case IN:
  List inValues = ((List) ListType.getInstance(type, false).getSerializer().deserialize(rightOperand));
  return inValues.contains(type.getSerializer().deserialize(leftOperand));
case CONTAINS:
origin: jsevellec/cassandra-unit

cellValue = cell == null
     ? null
     : listType.getSerializer().getElement(cell.value(), ElementAccessBound.getListIndex(collectionElement));
origin: org.apache.cassandra/cassandra-all

cellValue = cell == null
     ? null
     : listType.getSerializer().getElement(cell.value(), ElementAccessBound.getListIndex(collectionElement));
origin: com.strapdata.cassandra/cassandra-all

cellValue = cell == null
     ? null
     : listType.getSerializer().getElement(cell.value(), ElementAccessBound.getListIndex(collectionElement));
origin: com.strapdata.cassandra/cassandra-all

ByteBuffer listElementValue = listType.getSerializer().getElement(cell.value(), getListIndex(collectionElement));
return compareWithOperator(operator, listType.getElementsType(), value, listElementValue);
origin: jsevellec/cassandra-unit

ByteBuffer listElementValue = listType.getSerializer().getElement(cell.value(), getListIndex(collectionElement));
return compareWithOperator(operator, listType.getElementsType(), value, listElementValue);
origin: org.apache.cassandra/cassandra-all

ByteBuffer listElementValue = listType.getSerializer().getElement(cell.value(), getListIndex(collectionElement));
return compareWithOperator(operator, listType.getElementsType(), value, listElementValue);
origin: com.facebook.presto.cassandra/cassandra-server

ByteBuffer listElementValue = cell.isLive(now) ? listType.getSerializer().getElement(cell.value(), getListIndex(collectionElement))
                        : null;
return compareWithOperator(operator, listType.getElementsType(), value, listElementValue);
org.apache.cassandra.db.marshalListTypegetSerializer

Popular methods of ListType

  • getElementsType
  • getInstance
  • <init>
  • compareListOrSet
  • compose
  • isMultiCell
  • setOrListToJsonString
  • decompose
  • toString
  • valueComparator

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ImageIO (javax.imageio)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for WebStorm
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