GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.cassandra.meta.conversion
Class DefaultColumnFamilyNameConverter

java.lang.Object
  extended by org.openspaces.persistency.cassandra.meta.conversion.DefaultColumnFamilyNameConverter
All Implemented Interfaces:
ColumnFamilyNameConverter

public class DefaultColumnFamilyNameConverter
extends Object
implements ColumnFamilyNameConverter

A ColumnFamilyNameConverter implementation that works as follows: If the type names length does not exceed a 48 characters length, the dots in the type name will be replaced by underscores. Otherwise, the type simple name (without the packages prefix) will be used with the first 6 chars of the string representation of the given type name MD5 hash to avoid name collisions. If the above also exceeds a 48 characters length, the simple name will be truncated to its first 42 characters and concatenated with the MD5 suffix mentioned above.

Since:
9.1.1
Author:
Dan Kilman

Constructor Summary
DefaultColumnFamilyNameConverter()
           
 
Method Summary
 String toColumnFamilyName(String typeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultColumnFamilyNameConverter

public DefaultColumnFamilyNameConverter()
Method Detail

toColumnFamilyName

public String toColumnFamilyName(String typeName)
Specified by:
toColumnFamilyName in interface ColumnFamilyNameConverter
Parameters:
typeName - The type name matching the column family name.
Returns:
The column family name as it will exist on Cassandra.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.