com.netflix.astyanax.thrift
Class ThriftConverter

java.lang.Object
  extended by com.netflix.astyanax.thrift.ThriftConverter

public class ThriftConverter
extends Object


Constructor Summary
ThriftConverter()
           
 
Method Summary
static
<K> org.apache.cassandra.thrift.ColumnParent
getColumnParent(ColumnFamily<?,?> columnFamily, ColumnPath<?> path)
          Construct a Hector ColumnParent based on the information in the query and the type of column family being queried.
static
<K> org.apache.cassandra.thrift.ColumnPath
getColumnPath(ColumnFamily<?,?> columnFamily, ColumnPath<?> path)
          Construct a Thrift ColumnPath based on the information in the query and the type of column family being queried.
static
<C> org.apache.cassandra.thrift.SlicePredicate
getPredicate(ColumnSlice<C> columns, Serializer<C> colSer)
          Return a Hector SlicePredicate based on the provided column slice
static ConnectionException ToConnectionPoolException(Exception e)
          Convert from Thrift exceptions to an internal ConnectionPoolException
static org.apache.cassandra.thrift.ConsistencyLevel ToThriftConsistencyLevel(ConsistencyLevel cl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftConverter

public ThriftConverter()
Method Detail

getColumnParent

public static <K> org.apache.cassandra.thrift.ColumnParent getColumnParent(ColumnFamily<?,?> columnFamily,
                                                                           ColumnPath<?> path)
                                                                throws BadRequestException
Construct a Hector ColumnParent based on the information in the query and the type of column family being queried.

Type Parameters:
K -
Parameters:
columnFamily -
path -
Returns:
Throws:
BadRequestException

getColumnPath

public static <K> org.apache.cassandra.thrift.ColumnPath getColumnPath(ColumnFamily<?,?> columnFamily,
                                                                       ColumnPath<?> path)
                                                            throws BadRequestException
Construct a Thrift ColumnPath based on the information in the query and the type of column family being queried.

Type Parameters:
K -
Parameters:
columnFamily -
path -
Returns:
Throws:
org.apache.cassandra.thrift.NotFoundException
org.apache.cassandra.thrift.InvalidRequestException
org.apache.thrift.TException
BadRequestException

getPredicate

public static <C> org.apache.cassandra.thrift.SlicePredicate getPredicate(ColumnSlice<C> columns,
                                                                          Serializer<C> colSer)
Return a Hector SlicePredicate based on the provided column slice

Type Parameters:
C -
Parameters:
columns -
colSer -
Returns:

ToConnectionPoolException

public static ConnectionException ToConnectionPoolException(Exception e)
Convert from Thrift exceptions to an internal ConnectionPoolException

Parameters:
e -
Returns:

ToThriftConsistencyLevel

public static org.apache.cassandra.thrift.ConsistencyLevel ToThriftConsistencyLevel(ConsistencyLevel cl)


Copyright © 2012. All Rights Reserved.