Storage Engine API
partitioned.h File Reference
#include <algorithm>
#include <cstdlib>
#include <iterator>
#include <memory>
#include <numeric>
#include <utility>
#include <vector>
#include <boost/align/aligned_allocator.hpp>
#include "mongo/stdx/mutex.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/with_alignment.h"

Go to the source code of this file.

Classes

struct  mongo::Partitioner< T >
 The default partitioning policy: If using a numeric built-in type, will use the lower bits of a number to decide which partition to assign it to. More...
 
class  mongo::Partitioned< AssociativeContainer, nPartitions, KeyPartitioner >
 A templated class used to partition an associative container like a set or a map to increase scalability. More...
 
struct  mongo::Partitioned< AssociativeContainer, nPartitions, KeyPartitioner >::IteratorEndTag
 
class  mongo::Partitioned< AssociativeContainer, nPartitions, KeyPartitioner >::All
 Used to protect access to all partitions of this partitioned associative structure. More...
 
class  mongo::Partitioned< AssociativeContainer, nPartitions, KeyPartitioner >::OnePartition
 Used to protect access to a single partition of a Partitioned. More...
 

Namespaces

 mongo
 Copyright (C) 2014 MongoDB Inc.
 
 mongo::partitioned_detail
 

Typedefs

using mongo::partitioned_detail::CacheAlignedMutex = CacheAligned< stdx::mutex >
 

Functions

std::size_t mongo::partitionOf (const char x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const unsigned char x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const signed char x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const int x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const unsigned int x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const short x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const unsigned short x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const long x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const unsigned long x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const long long x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const unsigned long long x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const wchar_t x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const char16_t x, const std::size_t nPartitions)
 
std::size_t mongo::partitionOf (const char32_t x, const std::size_t nPartitions)
 
template<typename Key , typename Value >
Key mongo::partitioned_detail::getKey (const std::pair< Key, Value > &pair)
 
template<typename Key >
Key mongo::partitioned_detail::getKey (const Key &key)
 
template<typename T >
std::vector< stdx::unique_lock< stdx::mutex > > mongo::partitioned_detail::lockAllPartitions (T &mutexes)