public class ThriftUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.nio.ByteBuffer |
EMPTY_BYTE_BUFFER |
static int |
MUTATION_OVERHEAD |
| Constructor and Description |
|---|
ThriftUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.cassandra.thrift.SliceRange |
createAllInclusiveSliceRange() |
static <C> org.apache.cassandra.thrift.SliceRange |
createSliceRange(com.netflix.astyanax.Serializer<C> serializer,
C startColumn,
C endColumn,
boolean reversed,
int limit) |
static <T extends org.apache.thrift.TBase> |
getPropertiesFromThrift(T entity) |
static <T> T |
getThriftObjectFromProperties(java.lang.Class<T> clazz,
java.util.Properties props) |
static java.lang.Object |
populateObjectFromProperties(java.lang.Object entity,
java.util.Properties props) |
static java.util.Map<java.lang.String,java.lang.Object> |
propertiesToMap(java.util.Properties props)
Convert a Properties object into a tree
|
static void |
setPropertiesFromThrift(java.lang.String prefix,
java.util.Properties properties,
org.apache.thrift.TBase entity)
Quick and dirty implementation that converts thrift DDL to a Properties object by flattening
the parameters
|
static java.lang.Object |
valueForBasicType(java.lang.Object value,
byte type) |
public static final java.nio.ByteBuffer EMPTY_BYTE_BUFFER
public static final int MUTATION_OVERHEAD
public static org.apache.cassandra.thrift.SliceRange createAllInclusiveSliceRange()
public static <C> org.apache.cassandra.thrift.SliceRange createSliceRange(com.netflix.astyanax.Serializer<C> serializer,
C startColumn,
C endColumn,
boolean reversed,
int limit)
public static <T extends org.apache.thrift.TBase> java.util.Properties getPropertiesFromThrift(T entity)
throws java.lang.Exception
java.lang.Exceptionpublic static void setPropertiesFromThrift(java.lang.String prefix,
java.util.Properties properties,
org.apache.thrift.TBase entity)
throws java.lang.Exception
prefix - properties - entity - java.lang.Exceptionpublic static <T> T getThriftObjectFromProperties(java.lang.Class<T> clazz,
java.util.Properties props)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Object populateObjectFromProperties(java.lang.Object entity,
java.util.Properties props)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Object valueForBasicType(java.lang.Object value,
byte type)
public static java.util.Map<java.lang.String,java.lang.Object> propertiesToMap(java.util.Properties props)
props -