1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
12 #include "rocksdb/rocksdb_namespace.h"
14 namespace ROCKSDB_NAMESPACE
{
17 struct CassandraOptions
{
18 static const char* kName() { return "CassandraOptions"; }
19 CassandraOptions(int32_t _gc_grace_period_in_seconds
, size_t _operands_limit
,
20 bool _purge_ttl_on_expiration
= false)
21 : operands_limit(_operands_limit
),
22 gc_grace_period_in_seconds(_gc_grace_period_in_seconds
),
23 purge_ttl_on_expiration(_purge_ttl_on_expiration
) {}
24 // Limit on the number of merge operands.
25 size_t operands_limit
;
27 // How long (in seconds) tombstoned data remains before it is purged
28 int32_t gc_grace_period_in_seconds
;
30 // If is set to true, expired data will be directly purged.
31 // Otherwise expired data will be converted tombstones first,
32 // then be eventually removed after gc grace period. This value should
33 // only true if all writes have same ttl setting, otherwise it could bring old
35 bool purge_ttl_on_expiration
;
39 int RegisterCassandraObjects(ObjectLibrary
& library
, const std::string
& arg
);
41 #endif // ROCKSDB_LITE
42 } // namespace cassandra
43 } // namespace ROCKSDB_NAMESPACE