long bytes = 0;
for (K key : keys)
bytes += translateKey(key).remaining();
// an approximation -- the keyset can change while saving
estimatedTotalBytes = bytes;
OperationType type;
if (cacheType == ColumnFamilyStore.CacheType.KEY_CACHE_TYPE)
type = OperationType.KEY_CACHE_SAVE;
else if (cacheType == ColumnFamilyStore.CacheType.ROW_CACHE_TYPE)
type = OperationType.ROW_CACHE_SAVE;