public org.apache.cassandra.db.migration.avro.CfDef deflate()
{
org.apache.cassandra.db.migration.avro.CfDef cf = new org.apache.cassandra.db.migration.avro.CfDef();
cf.id = cfId;
cf.keyspace = new Utf8(ksName);
cf.name = new Utf8(cfName);
cf.column_type = new Utf8(cfType.name());
cf.comparator_type = new Utf8(comparator.toString());
if (subcolumnComparator != null)
cf.subcomparator_type = new Utf8(subcolumnComparator.toString());
cf.comment = new Utf8(comment);
cf.row_cache_size = rowCacheSize;
cf.key_cache_size = keyCacheSize;
cf.read_repair_chance = readRepairChance;
cf.replicate_on_write = replicateOnWrite;
cf.gc_grace_seconds = gcGraceSeconds;
cf.default_validation_class = new Utf8(defaultValidator.toString());
cf.key_validation_class = new Utf8(keyValidator.toString());
cf.min_compaction_threshold = minCompactionThreshold;
cf.max_compaction_threshold = maxCompactionThreshold;
cf.row_cache_save_period_in_seconds = rowCacheSavePeriodInSeconds;
cf.key_cache_save_period_in_seconds = keyCacheSavePeriodInSeconds;
cf.memtable_flush_after_mins = memtableFlushAfterMins;
cf.memtable_throughput_in_mb = memtableThroughputInMb;
cf.memtable_operations_in_millions = memtableOperationsInMillions;
cf.merge_shards_chance = mergeShardsChance;
cf.key_alias = keyAlias;
cf.column_metadata = SerDeUtils.createArray(column_metadata.size(),
org.apache.cassandra.db.migration.avro.ColumnDef.SCHEMA$);
for (ColumnDefinition cd : column_metadata.values())
cf.column_metadata.add(cd.deflate());
cf.row_cache_provider = new Utf8(rowCacheProvider.getClass().getName());
return cf;
}