Cache: Rename all C++ headers from *.h to *.hh
Also remove some superfluous files and old include guards.
This commit is contained in:
parent
3877d7bc5e
commit
f871664796
6
server/modules/filter/cache/cache.cc
vendored
6
server/modules/filter/cache/cache.cc
vendored
@ -12,12 +12,12 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "cache.h"
|
||||
#include "cache.hh"
|
||||
#include <new>
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/gwdirs.h>
|
||||
#include "storagefactory.h"
|
||||
#include "storage.h"
|
||||
#include "storagefactory.hh"
|
||||
#include "storage.hh"
|
||||
|
||||
Cache::Cache(const std::string& name,
|
||||
const CACHE_CONFIG* pConfig,
|
||||
|
4
server/modules/filter/cache/cachefilter.cc
vendored
4
server/modules/filter/cache/cachefilter.cc
vendored
@ -17,8 +17,8 @@
|
||||
#include <maxscale/gwdirs.h>
|
||||
#include <maxscale/modulecmd.h>
|
||||
#include <maxscale/cpp.hh>
|
||||
#include "cachemt.h"
|
||||
#include "cachept.h"
|
||||
#include "cachemt.hh"
|
||||
#include "cachept.hh"
|
||||
|
||||
using std::auto_ptr;
|
||||
using std::string;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
#include <maxscale/mysql_utils.h>
|
||||
#include "storage.h"
|
||||
#include "storage.hh"
|
||||
|
||||
CacheFilterSession::CacheFilterSession(SESSION* pSession, Cache* pCache, char* zDefaultDb)
|
||||
: maxscale::FilterSession(pSession)
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/buffer.h>
|
||||
#include <maxscale/filter.hh>
|
||||
#include "cache.h"
|
||||
#include "cache.hh"
|
||||
#include "cachefilter.h"
|
||||
#include "cache_storage_api.h"
|
||||
|
||||
|
6
server/modules/filter/cache/cachemt.cc
vendored
6
server/modules/filter/cache/cachemt.cc
vendored
@ -12,9 +12,9 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "cachemt.h"
|
||||
#include "storage.h"
|
||||
#include "storagefactory.h"
|
||||
#include "cachemt.hh"
|
||||
#include "storage.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using maxscale::SpinLockGuard;
|
||||
using std::tr1::shared_ptr;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/spinlock.hh>
|
||||
#include "cachesimple.h"
|
||||
#include "cachesimple.hh"
|
||||
|
||||
class CacheMT : public CacheSimple
|
||||
{
|
6
server/modules/filter/cache/cachept.cc
vendored
6
server/modules/filter/cache/cachept.cc
vendored
@ -12,12 +12,12 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "cachept.h"
|
||||
#include "cachept.hh"
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/platform.h>
|
||||
#include <maxscale/cpp.hh>
|
||||
#include "cachest.h"
|
||||
#include "storagefactory.h"
|
||||
#include "cachest.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
using std::string;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <tr1/memory>
|
||||
#include <vector>
|
||||
#include "cache.h"
|
||||
#include "cache.hh"
|
||||
|
||||
class CachePT : public Cache
|
||||
{
|
6
server/modules/filter/cache/cachesimple.cc
vendored
6
server/modules/filter/cache/cachesimple.cc
vendored
@ -12,9 +12,9 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "cachesimple.h"
|
||||
#include "storage.h"
|
||||
#include "storagefactory.h"
|
||||
#include "cachesimple.hh"
|
||||
#include "storage.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
CacheSimple::CacheSimple(const std::string& name,
|
||||
const CACHE_CONFIG* pConfig,
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <tr1/unordered_map>
|
||||
#include <maxscale/hashtable.h>
|
||||
#include "cache.h"
|
||||
#include "cache.hh"
|
||||
#include "cache_storage_api.hh"
|
||||
|
||||
class Storage;
|
6
server/modules/filter/cache/cachest.cc
vendored
6
server/modules/filter/cache/cachest.cc
vendored
@ -12,10 +12,10 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "cachest.h"
|
||||
#include "cachest.hh"
|
||||
#include <maxscale/cpp.hh>
|
||||
#include "storage.h"
|
||||
#include "storagefactory.h"
|
||||
#include "storage.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "cachesimple.h"
|
||||
#include "cachesimple.hh"
|
||||
|
||||
class CacheST : public CacheSimple
|
||||
{
|
2
server/modules/filter/cache/lrustorage.cc
vendored
2
server/modules/filter/cache/lrustorage.cc
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "lrustorage.h"
|
||||
#include "lrustorage.hh"
|
||||
|
||||
LRUStorage::LRUStorage(Storage* pstorage, size_t max_count, size_t max_size)
|
||||
: pstorage_(pstorage)
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <tr1/unordered_map>
|
||||
#include "cachefilter.h"
|
||||
#include "cache_storage_api.hh"
|
||||
#include "storage.h"
|
||||
#include "storage.hh"
|
||||
|
||||
class LRUStorage : public Storage
|
||||
{
|
2
server/modules/filter/cache/lrustoragemt.cc
vendored
2
server/modules/filter/cache/lrustoragemt.cc
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "lrustoragemt.h"
|
||||
#include "lrustoragemt.hh"
|
||||
|
||||
using maxscale::SpinLockGuard;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/spinlock.hh>
|
||||
#include "lrustorage.h"
|
||||
#include "lrustorage.hh"
|
||||
|
||||
class LRUStorageMT : public LRUStorage
|
||||
{
|
2
server/modules/filter/cache/lrustoragest.cc
vendored
2
server/modules/filter/cache/lrustoragest.cc
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "lrustoragest.h"
|
||||
#include "lrustoragest.hh"
|
||||
#include <maxscale/cpp.hh>
|
||||
|
||||
LRUStorageST::LRUStorageST(Storage* pstorage, size_t max_count, size_t max_size)
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "lrustorage.h"
|
||||
#include "lrustorage.hh"
|
||||
|
||||
class LRUStorageST : public LRUStorage
|
||||
{
|
2
server/modules/filter/cache/storage.cc
vendored
2
server/modules/filter/cache/storage.cc
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "storage.h"
|
||||
#include "storage.hh"
|
||||
|
||||
|
||||
Storage::Storage()
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_inmemory"
|
||||
#include "inmemorystorage.h"
|
||||
#include "inmemorystorage.hh"
|
||||
#include <openssl/sha.h>
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tr1/unordered_map>
|
||||
#include "../../cachefilter.h"
|
||||
#include "../../cache_storage_api.hh"
|
||||
|
||||
class InMemoryStorage
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_inmemory"
|
||||
#include "inmemorystoragemt.h"
|
||||
#include "inmemorystoragemt.hh"
|
||||
|
||||
using maxscale::SpinLockGuard;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/spinlock.hh>
|
||||
#include "inmemorystorage.h"
|
||||
#include "inmemorystorage.hh"
|
||||
|
||||
class InMemoryStorageMT : public InMemoryStorage
|
||||
{
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_inmemory"
|
||||
#include "inmemorystoragest.h"
|
||||
#include "inmemorystoragest.hh"
|
||||
|
||||
InMemoryStorageST::InMemoryStorageST(const std::string& name, uint32_t ttl)
|
||||
: InMemoryStorage(name, ttl)
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "inmemorystorage.h"
|
||||
#include "inmemorystorage.hh"
|
||||
|
||||
class InMemoryStorageST : public InMemoryStorage
|
||||
{
|
@ -14,8 +14,8 @@
|
||||
#define MXS_MODULE_NAME "storage_inmemory"
|
||||
#include <inttypes.h>
|
||||
#include "../../cache_storage_api.h"
|
||||
#include "inmemorystoragest.h"
|
||||
#include "inmemorystoragemt.h"
|
||||
#include "inmemorystoragest.hh"
|
||||
#include "inmemorystoragemt.hh"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_rocksdb"
|
||||
#include "rocksdbinternals.h"
|
||||
#include "rocksdbinternals.hh"
|
||||
#include <rocksdb/env.h>
|
||||
#include <util/coding.h>
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _ROCKSDBINTERNALS_H
|
||||
#define _ROCKSDBINTERNALS_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -15,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "storage_rocksdb.h"
|
||||
#include <rocksdb/env.h>
|
||||
#include <rocksdb/version.h>
|
||||
#include <rocksdb/slice.h>
|
||||
@ -38,5 +35,3 @@ static const uint32_t TS_LENGTH = sizeof(int32_t);
|
||||
bool IsStale(const rocksdb::Slice& slice, int32_t ttl, rocksdb::Env* pEnv);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_rocksdb"
|
||||
#include "rocksdbstorage.h"
|
||||
#include "rocksdbstorage.hh"
|
||||
#include <openssl/sha.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@ -25,7 +25,7 @@
|
||||
#include <maxscale/gwdirs.h>
|
||||
#include <maxscale/modutil.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
#include "rocksdbinternals.h"
|
||||
#include "rocksdbinternals.hh"
|
||||
|
||||
using std::for_each;
|
||||
using std::set;
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _ROCKSDBSTORAGE_H
|
||||
#define _ROCKSDBSTORAGE_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -15,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "storage_rocksdb.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <rocksdb/utilities/db_ttl.h>
|
||||
@ -62,5 +59,3 @@ private:
|
||||
|
||||
static rocksdb::WriteOptions s_writeOptions;
|
||||
};
|
||||
|
||||
#endif
|
@ -12,10 +12,9 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_rocksdb"
|
||||
#include "storage_rocksdb.h"
|
||||
#include <inttypes.h>
|
||||
#include "../../cache_storage_api.h"
|
||||
#include "rocksdbstorage.h"
|
||||
#include "rocksdbstorage.hh"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
#ifndef _STORAGE_ROCKSDB_H
|
||||
#define _STORAGE_ROCKSDB_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
||||
*
|
||||
* Change Date: 2019-07-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "storage_rocksdb"
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
|
||||
#endif
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "storagefactory.h"
|
||||
#include "storagefactory.hh"
|
||||
#include <dlfcn.h>
|
||||
#include <sys/param.h>
|
||||
#include <new>
|
||||
@ -20,9 +20,9 @@
|
||||
#include <maxscale/gwdirs.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
#include "cachefilter.h"
|
||||
#include "lrustoragest.h"
|
||||
#include "lrustoragemt.h"
|
||||
#include "storagereal.h"
|
||||
#include "lrustoragest.hh"
|
||||
#include "lrustoragemt.hh"
|
||||
#include "storagereal.hh"
|
||||
|
||||
|
||||
namespace
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _MAXSCALE_FILTER_CACHE_STORAGEFACTORY_H
|
||||
#define _MAXSCALE_FILTER_CACHE_STORAGEFACTORY_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -44,5 +42,3 @@ private:
|
||||
CACHE_STORAGE_API* m_pApi; /*< API of storage. */
|
||||
uint32_t m_capabilities; /*< Capabilities of storage. */
|
||||
};
|
||||
|
||||
#endif
|
2
server/modules/filter/cache/storagereal.cc
vendored
2
server/modules/filter/cache/storagereal.cc
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MXS_MODULE_NAME "cache"
|
||||
#include "storagereal.h"
|
||||
#include "storagereal.hh"
|
||||
|
||||
|
||||
StorageReal::StorageReal(CACHE_STORAGE_API* pApi, CACHE_STORAGE* pStorage)
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "storage.h"
|
||||
#include "storage.hh"
|
||||
|
||||
class StorageReal : public Storage
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user