Example usage for org.apache.cassandra.serializers BytesSerializer instance

List of usage examples for org.apache.cassandra.serializers BytesSerializer instance

Introduction

In this page you can find the example usage for org.apache.cassandra.serializers BytesSerializer instance.

Prototype

BytesSerializer instance

To view the source code for org.apache.cassandra.serializers BytesSerializer instance.

Click Source Link

Usage

From source file:com.impetus.client.cassandra.schemamanager.CassandraValidationClassMapper.java

License:Apache License

/**
 * Gets the validation serializer class instance.
 * //  w ww  .  j  av a2s  .  c o  m
 * @param dataType
 *            the data type
 * @param isCql3Enabled
 *            the is cql3 enabled
 * @return the validation serializer class instance
 */
public static TypeSerializer<?> getValidationSerializerClassInstance(Class<?> dataType, boolean isCql3Enabled) {
    resetMapperForCQL3(isCql3Enabled);
    TypeSerializer<?> validation_class;
    validation_class = validationSerializerClassMapper.get(dataType);
    if (!(validation_class != null)) {
        validation_class = BytesSerializer.instance;
    }
    resetMapperForThrift(isCql3Enabled);
    return validation_class;
}