congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now