class ClockCacheShard final : public CacheShard {
public:
// Hash map type.
- typedef tbb::concurrent_hash_map<CacheKey, CacheHandle*, CacheKey> HashTable;
+ using HashTable = tbb::concurrent_hash_map<CacheKey, CacheHandle*, CacheKey>;
ClockCacheShard();
~ClockCacheShard() override;
const Comparator* ucmp_;
};
-typedef std::priority_queue<InputFileInfo, std::vector<InputFileInfo>,
- SmallestKeyHeapComparator>
- SmallestKeyHeap;
+using SmallestKeyHeap =
+ std::priority_queue<InputFileInfo, std::vector<InputFileInfo>,
+ SmallestKeyHeapComparator>;
// This function creates the heap that is used to find if the files are
// overlapping during universal compaction when the allow_trivial_move
}
namespace {
-typedef autovector<ColumnFamilyData*, 2> CfdList;
+using CfdList = autovector<ColumnFamilyData*, 2>;
bool CfdListContains(const CfdList& list, ColumnFamilyData* cfd) {
for (const ColumnFamilyData* t : list) {
if (t == cfd) {
// specified value, this flush request is considered to have completed its
// work of flushing this column family. After completing the work for all
// column families in this request, this flush is considered complete.
- typedef std::vector<std::pair<ColumnFamilyData*, uint64_t>> FlushRequest;
+ using FlushRequest = std::vector<std::pair<ColumnFamilyData*, uint64_t>>;
void GenerateFlushRequest(const autovector<ColumnFamilyData*>& cfds,
FlushRequest* req);
#endif // TRAVIS
namespace {
-typedef std::map<std::string, std::string> KVMap;
+using KVMap = std::map<std::string, std::string>;
}
class ModelDB : public DB {
const Comparator* comparator_;
};
-typedef std::priority_queue<InternalIterator*, std::vector<InternalIterator*>,
- MinIterComparator> MinIterHeap;
+using MinIterHeap =
+ std::priority_queue<InternalIterator*, std::vector<InternalIterator*>,
+ MinIterComparator>;
/**
* ForwardIterator is a special type of iterator that only supports Seek()
class ProtectionInfoKVOTS;
// Aliases for 64-bit protection infos.
-typedef ProtectionInfo<uint64_t> ProtectionInfo64;
-typedef ProtectionInfoKVOT<uint64_t> ProtectionInfoKVOT64;
-typedef ProtectionInfoKVOTC<uint64_t> ProtectionInfoKVOTC64;
-typedef ProtectionInfoKVOTS<uint64_t> ProtectionInfoKVOTS64;
+using ProtectionInfo64 = ProtectionInfo<uint64_t>;
+using ProtectionInfoKVOT64 = ProtectionInfoKVOT<uint64_t>;
+using ProtectionInfoKVOTC64 = ProtectionInfoKVOTC<uint64_t>;
+using ProtectionInfoKVOTS64 = ProtectionInfoKVOTS<uint64_t>;
template <typename T>
class ProtectionInfo {
#ifdef ROCKSDB_JEMALLOC
-typedef struct {
+struct MallocStatus {
char* cur;
char* end;
-} MallocStatus;
+};
static void GetJemallocStatus(void* mstat_arg, const char* status) {
MallocStatus* mstat = reinterpret_cast<MallocStatus*>(mstat_arg);
}
}
- typedef void (*ReleaseFunction)(void* arg1);
+ using ReleaseFunction = void (*)(void* arg1);
void PinPtr(void* ptr, ReleaseFunction release_func) {
assert(pinning_enabled);
if (ptr == nullptr) {
#include "test_util/testharness.h"
namespace ROCKSDB_NAMESPACE {
-typedef Env* CreateEnvFunc();
namespace {
+using CreateEnvFunc = Env*();
+
// These functions are used to create the various environments under which this
// test can execute. These functions are used to allow the test cases to be
// created without the Env being initialized, thereby eliminating a potential
// the tables.
// Default: empty vector -- no user-defined statistics collection will be
// performed.
- typedef std::vector<std::shared_ptr<TablePropertiesCollectorFactory>>
- TablePropertiesCollectorFactories;
+ using TablePropertiesCollectorFactories =
+ std::vector<std::shared_ptr<TablePropertiesCollectorFactory>>;
TablePropertiesCollectorFactories table_properties_collector_factories;
// Maximum number of successive merge operations on a key in the memtable.
// takes in a buffer from the NVM cache and constructs an object using
// it. The callback doesn't have ownership of the buffer and should
// copy the contents into its own buffer.
- // typedef std::function<Status(void* buf, size_t size, void** out_obj,
- // size_t* charge)>
- // CreateCallback;
using CreateCallback = std::function<Status(void* buf, size_t size,
void** out_obj, size_t* charge)>;
//
// Note that unlike all of the preceding methods, this method is
// not abstract and therefore clients should not override it.
- typedef void (*CleanupFunction)(void* arg1, void* arg2);
+ using CleanupFunction = void (*)(void* arg1, void* arg2);
void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2);
void DelegateCleanupsTo(Cleanable* other);
// DoCleanup and also resets the pointers for reuse
// A collections of table properties objects, where
// key: is the table's file name.
// value: the table properties object of the given table.
-typedef std::unordered_map<std::string, std::shared_ptr<const TableProperties>>
- TablePropertiesCollection;
+using TablePropertiesCollection =
+ std::unordered_map<std::string, std::shared_ptr<const TableProperties>>;
// A DB is a persistent, versioned ordered map from keys to values.
// A DB is safe for concurrent access from multiple threads without
namespace ROCKSDB_NAMESPACE {
-typedef std::unordered_map<std::string, std::shared_ptr<const TableProperties>>
- TablePropertiesCollection;
+using TablePropertiesCollection =
+ std::unordered_map<std::string, std::shared_ptr<const TableProperties>>;
class DB;
class ColumnFamilyHandle;
class SliceTransform;
class Logger;
-typedef void* KeyHandle;
+using KeyHandle = void*;
extern Slice GetLengthPrefixedSlice(const char* data);
// concatenated with values.
class KeyComparator {
public:
- typedef ROCKSDB_NAMESPACE::Slice DecodedType;
+ using DecodedType = ROCKSDB_NAMESPACE::Slice;
virtual DecodedType decode_key(const char* key) const {
// The format of key is frozen and can be treated as a part of the API
// cache interface is specifically designed for persistent read cache.
class PersistentCache {
public:
- typedef std::vector<std::map<std::string, double>> StatsType;
+ using StatsType = std::vector<std::map<std::string, double>>;
virtual ~PersistentCache() {}
// ++pos) {
// ...
// }
-typedef std::map<std::string, std::string> UserCollectedProperties;
+using UserCollectedProperties = std::map<std::string, std::string>;
// table properties' human-readable names in the property block.
struct TablePropertiesNames {
namespace ROCKSDB_NAMESPACE {
class LogFile;
-typedef std::vector<std::unique_ptr<LogFile>> VectorLogPtr;
+using VectorLogPtr = std::vector<std::unique_ptr<LogFile>>;
enum WalFileType {
/* Indicates that WAL file is in archive directory. WAL files are moved from
using ColumnFamilyId = uint32_t;
// Represents a sequence number in a WAL file.
-typedef uint64_t SequenceNumber;
+using SequenceNumber = uint64_t;
const SequenceNumber kMinUnCommittedSeq = 1; // 0 is always committed
uint64_t size;
};
-typedef uint32_t BackupID;
+using BackupID = uint32_t;
struct BackupInfo {
BackupID backup_id = 0U;
// Number of bytes allocated in one block
const size_t kBlockSize;
// Array of new[] allocated memory blocks
- typedef std::vector<char*> Blocks;
+ using Blocks = std::vector<char*>;
Blocks blocks_;
struct MmapInfo {
template <class Key, class Value, class Hash>
size_t ApproximateMemoryUsage(
const std::unordered_map<Key, Value, Hash>& umap) {
- typedef std::unordered_map<Key, Value, Hash> Map;
+ using Map = std::unordered_map<Key, Value, Hash>;
return sizeof(umap) +
// Size of all items plus a next pointer for each item.
(sizeof(typename Map::value_type) + sizeof(void*)) * umap.size() +
namespace ROCKSDB_NAMESPACE {
namespace {
-typedef const char* Key;
-typedef SkipList<Key, const MemTableRep::KeyComparator&> MemtableSkipList;
-typedef std::atomic<void*> Pointer;
+using Key = const char*;
+using MemtableSkipList = SkipList<Key, const MemTableRep::KeyComparator&>;
+using Pointer = std::atomic<void*>;
// A data structure used as the header of a link list of a hash bucket.
struct BucketHeader {
private:
friend class DynamicIterator;
- typedef SkipList<const char*, const MemTableRep::KeyComparator&> Bucket;
+ using Bucket = SkipList<const char*, const MemTableRep::KeyComparator&>;
size_t bucket_size_;
namespace ROCKSDB_NAMESPACE {
// Our test skip list stores 8-byte unsigned integers
-typedef uint64_t Key;
+using Key = uint64_t;
static const char* Encode(const uint64_t* key) {
return reinterpret_cast<const char*>(key);
}
struct TestComparator {
- typedef Key DecodedType;
+ using DecodedType = Key;
static DecodedType decode_key(const char* b) {
return Decode(b);
}
};
-typedef InlineSkipList<TestComparator> TestInlineSkipList;
+using TestInlineSkipList = InlineSkipList<TestComparator>;
class InlineSkipTest : public testing::Test {
public:
namespace ROCKSDB_NAMESPACE {
-typedef uint64_t Key;
+using Key = uint64_t;
struct TestComparator {
int operator()(const Key& a, const Key& b) const {
private:
friend class Iterator;
- typedef std::vector<const char*> Bucket;
+ using Bucket = std::vector<const char*>;
std::shared_ptr<Bucket> bucket_;
mutable port::RWMutex rwlock_;
bool immutable_;
/* not yet supported
CompressionOptions compression_opts;
TablePropertiesCollectorFactories table_properties_collector_factories;
- typedef std::vector<std::shared_ptr<TablePropertiesCollectorFactory>>
- TablePropertiesCollectorFactories;
+ using TablePropertiesCollectorFactories =
+ std::vector<std::shared_ptr<TablePropertiesCollectorFactory>>;
UpdateStatus (*inplace_callback)(char* existing_value,
uint34_t* existing_value_size,
Slice delta_value,
};
const char kSpecialChar = 'z';
-typedef std::vector<std::pair<size_t, size_t>> OffsetGap;
+using OffsetGap = std::vector<std::pair<size_t, size_t>>;
void FillWithSpecialChar(char* start_ptr, size_t total_size,
const OffsetGap& excluded,
// static void Initializer() { ... do something ...; }
// ...
// port::InitOnce(&init_control, &Initializer);
-typedef intptr_t OnceType;
+using OnceType = intptr_t;
#define LEVELDB_ONCE_INIT 0
extern void InitOnce(port::OnceType*, void (*initializer)());
// Returns -1 if not available on this platform
extern int PhysicalCoreID();
-typedef pthread_once_t OnceType;
+using OnceType = pthread_once_t;
#define LEVELDB_ONCE_INIT PTHREAD_ONCE_INIT
extern void InitOnce(OnceType* once, void (*initializer)());
namespace port {
// Avoid including winsock2.h for this definition
-typedef struct timeval {
+struct timeval {
long tv_sec;
long tv_usec;
-} timeval;
+};
void gettimeofday(struct timeval* tv, struct timezone* tz);
// RAII helpers for HANDLEs
const auto CloseHandleFunc = [](HANDLE h) { ::CloseHandle(h); };
-typedef std::unique_ptr<void, decltype(CloseHandleFunc)> UniqueCloseHandlePtr;
+using UniqueCloseHandlePtr = std::unique_ptr<void, decltype(CloseHandleFunc)>;
const auto FindCloseFunc = [](HANDLE h) { ::FindClose(h); };
-typedef std::unique_ptr<void, decltype(FindCloseFunc)> UniqueFindClosePtr;
+using UniqueFindClosePtr = std::unique_ptr<void, decltype(FindCloseFunc)>;
void WinthreadCall(const char* label, std::error_code result) {
if (0 != result.value()) {
uint64_t GetPerfCounterFrequency() const { return perf_counter_frequency_; }
private:
- typedef VOID(WINAPI* FnGetSystemTimePreciseAsFileTime)(LPFILETIME);
+ using FnGetSystemTimePreciseAsFileTime = VOID(WINAPI*)(LPFILETIME);
uint64_t perf_counter_frequency_;
uint64_t nano_seconds_per_period_;
#undef DeleteFile
#ifndef _SSIZE_T_DEFINED
-typedef SSIZE_T ssize_t;
+using ssize_t = SSIZE_T;
#endif
// size_t printf formatting named in the manner of C99 standard formatting
extern int PhysicalCoreID();
// For Thread Local Storage abstraction
-typedef DWORD pthread_key_t;
+using pthread_key_t = DWORD;
inline int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)) {
// Not used
// -- is that it dynamically allocates its internals that are automatically
// freed when the thread terminates and not on the destruction of the
// object. This makes it difficult to control the source of memory
-// allocation
+// allocation
// - This implements Pimpl so we can easily replace the guts of the
// object in our private version if necessary.
class WindowsThread {
-
struct Data;
std::shared_ptr<Data> data_;
void Init(std::function<void()>&&);
-public:
-
- typedef void* native_handle_type;
+ public:
+ using native_handle_type = void*;
// Construct with no thread
WindowsThread();
// Template constructor
- //
+ //
// This templated constructor accomplishes several things
//
// - Allows the class as whole to be not a template
// dependent type that both checks the signature conformance to ensure
// that all of the necessary arguments are provided and allows pimpl
// implementation.
- template<class Fn,
- class... Args,
- class = typename std::enable_if<
- !std::is_same<typename std::decay<Fn>::type,
- WindowsThread>::value>::type>
- explicit WindowsThread(Fn&& fx, Args&&... ax) :
- WindowsThread() {
-
+ template <class Fn, class... Args,
+ class = typename std::enable_if<!std::is_same<
+ typename std::decay<Fn>::type, WindowsThread>::value>::type>
+ explicit WindowsThread(Fn&& fx, Args&&... ax) : WindowsThread() {
// Use binder to create a single callable entity
- auto binder = std::bind(std::forward<Fn>(fx),
- std::forward<Args>(ax)...);
+ auto binder = std::bind(std::forward<Fn>(fx), std::forward<Args>(ax)...);
// Use std::function to take advantage of the type erasure
// so we can still hide implementation within pimpl
// This also makes sure that the binder signature is compliant
Init(std::move(target));
}
-
~WindowsThread();
WindowsThread(const WindowsThread&) = delete;
// Use a vector of BlockRep as a buffer for a determined number
// of BlockRep structures. All data referenced by pointers in
// BlockRep will be freed when this vector is destructed.
- typedef std::vector<BlockRep> BlockRepBuffer;
+ using BlockRepBuffer = std::vector<BlockRep>;
BlockRepBuffer block_rep_buf;
// Use a thread-safe queue for concurrent access from block
// building thread and writer thread.
- typedef WorkQueue<BlockRep*> BlockRepPool;
+ using BlockRepPool = WorkQueue<BlockRep*>;
BlockRepPool block_rep_pool;
// Use BlockRepSlot to keep block order in write thread.
// Compression queue will pass references to BlockRep in block_rep_buf,
// and those references are always valid before the destruction of
// block_rep_buf.
- typedef WorkQueue<BlockRep*> CompressQueue;
+ using CompressQueue = WorkQueue<BlockRep*>;
CompressQueue compress_queue;
std::vector<port::Thread> compress_thread_pool;
// and those references are always valid before the corresponding
// BlockRep::slot is destructed, which is before the destruction of
// block_rep_buf.
- typedef WorkQueue<BlockRepSlot*> WriteQueue;
+ using WriteQueue = WorkQueue<BlockRepSlot*>;
WriteQueue write_queue;
std::unique_ptr<port::Thread> write_thread;
struct ReadOptions;
class GetContext;
-typedef std::vector<std::pair<std::string, std::string>> KVPairBlock;
+using KVPairBlock = std::vector<std::pair<std::string, std::string>>;
// Reader class for BlockBasedTable format.
// For the format of BlockBasedTable refer to
namespace ROCKSDB_NAMESPACE {
// Without anonymous namespace here, we fail the warning -Wmissing-prototypes
namespace {
-typedef BinaryHeap<IteratorWrapper*, MaxIteratorComparator> MergerMaxIterHeap;
-typedef BinaryHeap<IteratorWrapper*, MinIteratorComparator> MergerMinIterHeap;
+using MergerMaxIterHeap = BinaryHeap<IteratorWrapper*, MaxIteratorComparator>;
+using MergerMinIterHeap = BinaryHeap<IteratorWrapper*, MinIteratorComparator>;
} // namespace
const size_t kNumIterReserve = 4;
class Iterator {
public:
// -- iterator traits
- typedef Iterator self_type;
- typedef KeyContext value_type;
- typedef KeyContext& reference;
- typedef KeyContext* pointer;
- typedef int difference_type;
- typedef std::forward_iterator_tag iterator_category;
+ using self_type = Iterator;
+ using value_type = KeyContext;
+ using reference = KeyContext&;
+ using pointer = KeyContext*;
+ using difference_type = int;
+ using iterator_category = std::forward_iterator_tag;
Iterator(const Range* range, size_t idx)
: range_(range), ctx_(range->ctx_), index_(idx) {
class autovector {
public:
// General STL-style container member types.
- typedef T value_type;
- typedef typename std::vector<T>::difference_type difference_type;
- typedef typename std::vector<T>::size_type size_type;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
+ using value_type = T;
+ using difference_type = typename std::vector<T>::difference_type;
+ using size_type = typename std::vector<T>::size_type;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
// This class is the base for regular/const iterator
template <class TAutoVector, class TValueType>
class iterator_impl {
public:
// -- iterator traits
- typedef iterator_impl<TAutoVector, TValueType> self_type;
- typedef TValueType value_type;
- typedef TValueType& reference;
- typedef TValueType* pointer;
- typedef typename TAutoVector::difference_type difference_type;
- typedef std::random_access_iterator_tag iterator_category;
+ using self_type = iterator_impl<TAutoVector, TValueType>;
+ using value_type = TValueType;
+ using reference = TValueType&;
+ using pointer = TValueType*;
+ using difference_type = typename TAutoVector::difference_type;
+ using iterator_category = std::random_access_iterator_tag;
iterator_impl(TAutoVector* vect, size_t index)
: vect_(vect), index_(index) {};
size_t index_ = 0;
};
- typedef iterator_impl<autovector, value_type> iterator;
- typedef iterator_impl<const autovector, const value_type> const_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ using iterator = iterator_impl<autovector, value_type>;
+ using const_iterator = iterator_impl<const autovector, const value_type>;
+ using reverse_iterator = std::reverse_iterator<iterator>;
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
}
TEST_F(AutoVectorTest, EmplaceBack) {
- typedef std::pair<size_t, std::string> ValType;
+ using ValType = std::pair<size_t, std::string>;
autovector<ValType, kSize> vec;
for (size_t i = 0; i < 1000 * kSize; ++i) {
#endif // HAVE_POWER8
#endif // HAVE_ARM64_CRC
-typedef uint32_t (*Function)(uint32_t, const char*, size_t);
+using Function = uint32_t (*)(uint32_t, const char*, size_t);
#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
uint32_t ExtendPPCImpl(uint32_t crc, const char *buf, size_t size) {
template <typename T, T... Ints>
struct integer_sequence {
- typedef T value_type;
+ using value_type = T;
static constexpr size_t size() { return sizeof...(Ints); }
};
const Comparator* cmp;
};
-typedef std::map<std::string, std::string, LessOfComparator> KVMap;
+using KVMap = std::map<std::string, std::string, LessOfComparator>;
}
} // namespace ROCKSDB_NAMESPACE
#define MURMUR_HASH MurmurHash64A
uint64_t MurmurHash64A ( const void * key, int len, unsigned int seed );
#define MurmurHash MurmurHash64A
-typedef uint64_t murmur_t;
+using murmur_t = uint64_t;
#elif defined(__i386__)
#define MURMUR_HASH MurmurHash2
unsigned int MurmurHash2 ( const void * key, int len, unsigned int seed );
#define MurmurHash MurmurHash2
-typedef unsigned int murmur_t;
+using murmur_t = unsigned int;
#else
#define MURMUR_HASH MurmurHashNeutral2
unsigned int MurmurHashNeutral2 ( const void * key, int len, unsigned int seed );
#define MurmurHash MurmurHashNeutral2
-typedef unsigned int murmur_t;
+using murmur_t = unsigned int;
#endif
// Allow slice to be hashable by murmur hash.
// is needed to avoid deadlocks. In particular, the handler shouldn't lock any
// mutexes and shouldn't call any methods of any ThreadLocalPtr instances,
// unless you know what you're doing.
-typedef void (*UnrefHandler)(void* ptr);
+using UnrefHandler = void (*)(void* ptr);
// ThreadLocalPtr stores only values of pointer type. Different from
// the usual thread-local-storage, ThreadLocalPtr has the ability to
// data for all existing threads
void Scrape(autovector<void*>* ptrs, void* const replacement);
- typedef std::function<void(void*, void*)> FoldFunc;
+ using FoldFunc = std::function<void(void*, void*)>;
// Update res by applying func on each thread-local value. Holds a lock that
// prevents unref handler from running during this call, but clients must
// still provide external synchronization since the owning thread can
std::chrono::seconds Ttl() const;
};
-typedef std::vector<std::shared_ptr<ColumnBase>> Columns;
+using Columns = std::vector<std::shared_ptr<ColumnBase>>;
class RowValue {
public:
#include "rocksdb/utilities/transaction_db.h"
class Timer {
- typedef std::chrono::high_resolution_clock high_resolution_clock;
- typedef std::chrono::milliseconds milliseconds;
-public:
+ using high_resolution_clock = std::chrono::high_resolution_clock;
+ using milliseconds = std::chrono::milliseconds;
+
+ public:
explicit Timer(bool run = false)
{
if (run)
StringAppendOperatorTest::SetOpenDbFunction(&OpenNormalDb);
}
- typedef std::shared_ptr<DB> (*OpenFuncPtr)(const std::string&);
+ using OpenFuncPtr = std::shared_ptr<DB> (*)(const std::string&);
// Allows user to open databases with different configurations.
// e.g.: Can open a DB or a TtlDB, etc.
uint32_t size_ = 0;
};
-typedef LogicalBlockAddress LBA;
+using LBA = LogicalBlockAddress;
// class Writer
//
}
};
- typedef EvictableHashTable<BlockCacheFile, BlockCacheFileHash,
- BlockCacheFileEqual>
- CacheFileIndexType;
+ using CacheFileIndexType =
+ EvictableHashTable<BlockCacheFile, BlockCacheFileHash,
+ BlockCacheFileEqual>;
// Block Lookup Index
//
}
};
- typedef HashTable<BlockInfo*, Hash, Equal> BlockIndexType;
+ using BlockIndexType = HashTable<BlockInfo*, Hash, Equal>;
CacheFileIndexType cache_file_index_;
BlockIndexType block_index_;
template <class T, class Hash, class Equal>
class EvictableHashTable : private HashTable<T*, Hash, Equal> {
public:
- typedef HashTable<T*, Hash, Equal> hash_table;
+ using hash_table = HashTable<T*, Hash, Equal>;
explicit EvictableHashTable(const size_t capacity = 1024 * 1024,
const float load_factor = 2.0,
port::RWMutex* GetMutex(T* t) { return hash_table::GetMutex(t); }
private:
- typedef LRUList<T> LRUListType;
+ using LRUListType = LRUList<T>;
typename hash_table::Bucket& GetBucket(const uint64_t h) {
const uint32_t bucket_idx = h % hash_table::nbuckets_;
// to enable management and stacking of tiers.
class PersistentCacheTier : public PersistentCache {
public:
- typedef std::shared_ptr<PersistentCacheTier> Tier;
+ using Tier = std::shared_ptr<PersistentCacheTier>;
virtual ~PersistentCacheTier() {}
}
};
- typedef EvictableHashTable<CacheData, CacheDataHash, CacheDataEqual>
- IndexType;
+ using IndexType =
+ EvictableHashTable<CacheData, CacheDataHash, CacheDataEqual>;
// Evict LRU tail
bool Evict();
}
};
-typedef DeadlockInfoBufferTempl<DeadlockPath> DeadlockInfoBuffer;
+using DeadlockInfoBuffer = DeadlockInfoBufferTempl<DeadlockPath>;
struct TrackedTrxInfo {
autovector<TransactionID> m_neighbors;
TransactionDB* db_;
};
-typedef void (*init_func_t)(PointLockManagerTest*);
+using init_func_t = void (*)(PointLockManagerTest*);
class AnyLockManagerTest : public PointLockManagerTest,
public testing::WithParamInterface<init_func_t> {
namespace {
-typedef std::map<std::string, std::string> KVMap;
+using KVMap = std::map<std::string, std::string>;
enum BatchOperation { OP_PUT = 0, OP_DELETE = 1 };
}
const ReadableWriteBatch* write_batch_;
};
-typedef SkipList<WriteBatchIndexEntry*, const WriteBatchEntryComparator&>
- WriteBatchEntrySkipList;
+using WriteBatchEntrySkipList =
+ SkipList<WriteBatchIndexEntry*, const WriteBatchEntryComparator&>;
class WBWIIteratorImpl : public WBWIIterator {
public: