mongo::ChunkManager Class Reference

#include <chunk.h>

List of all members.

Public Member Functions

void _printChunks () const
 ChunkManager (string ns, ShardKeyPattern pattern, bool unique)
void createFirstChunk (const Shard &shard)
void drop (ChunkManagerPtr me)
ChunkPtr findChunk (const BSONObj &obj, bool retry=false)
ChunkPtr findChunkOnServer (const Shard &shard) const
void getAllShards (set< Shard > &all)
int getCurrentDesiredChunkSize () const
void getInfo (BSONObjBuilder &b)
string getns () const
unsigned long long getSequenceNumber () const
const ShardKeyPatterngetShardKey () const
void getShardsForQuery (set< Shard > &shards, const BSONObj &query)
void getShardsForRange (set< Shard > &shards, const BSONObj &min, const BSONObj &max)
ShardChunkVersion getVersion () const
ShardChunkVersion getVersion (const Shard &shard) const
bool hasShardKey (const BSONObj &obj)
bool isUnique () const
void maybeChunkCollection ()
int numChunks () const
string toString () const
virtual ~ChunkManager ()

Private Member Functions

bool _isValid () const
void _load ()
void _reload ()
void _reload_inlock ()
void ensureIndex_inlock ()

Private Attributes

ChunkMap _chunkMap
ChunkRangeManager _chunkRanges
ShardKeyPattern _key
RWLock _lock
string _ns
DistributedLock _nsLock
unsigned long long _sequenceNumber
set< Shard_shards
bool _unique

Static Private Attributes

static AtomicUInt NextSequenceNumber

Friends

class Chunk
class ChunkRangeManager

Detailed Description

Definition at line 298 of file chunk.h.


Constructor & Destructor Documentation

mongo::ChunkManager::ChunkManager ( string  ns,
ShardKeyPattern  pattern,
bool  unique 
)
virtual mongo::ChunkManager::~ChunkManager (  )  [virtual]

Member Function Documentation

bool mongo::ChunkManager::_isValid (  )  const [private]
void mongo::ChunkManager::_load (  )  [private]
void mongo::ChunkManager::_printChunks (  )  const
void mongo::ChunkManager::_reload (  )  [private]
void mongo::ChunkManager::_reload_inlock (  )  [private]
void mongo::ChunkManager::createFirstChunk ( const Shard shard  ) 
void mongo::ChunkManager::drop ( ChunkManagerPtr  me  ) 
Parameters:
me - so i don't get deleted before i'm done
void mongo::ChunkManager::ensureIndex_inlock (  )  [private]
ChunkPtr mongo::ChunkManager::findChunk ( const BSONObj obj,
bool  retry = false 
)
ChunkPtr mongo::ChunkManager::findChunkOnServer ( const Shard shard  )  const
void mongo::ChunkManager::getAllShards ( set< Shard > &  all  ) 
int mongo::ChunkManager::getCurrentDesiredChunkSize (  )  const
void mongo::ChunkManager::getInfo ( BSONObjBuilder b  )  [inline]

Definition at line 332 of file chunk.h.

string mongo::ChunkManager::getns (  )  const [inline]

Definition at line 304 of file chunk.h.

unsigned long long mongo::ChunkManager::getSequenceNumber (  )  const [inline]

this is just an increasing number of how many ChunkManagers we have so we know if something has been updated

Definition at line 330 of file chunk.h.

const ShardKeyPattern& mongo::ChunkManager::getShardKey (  )  const [inline]

Definition at line 313 of file chunk.h.

void mongo::ChunkManager::getShardsForQuery ( set< Shard > &  shards,
const BSONObj query 
)
void mongo::ChunkManager::getShardsForRange ( set< Shard > &  shards,
const BSONObj min,
const BSONObj max 
)
ShardChunkVersion mongo::ChunkManager::getVersion (  )  const
ShardChunkVersion mongo::ChunkManager::getVersion ( const Shard shard  )  const
bool mongo::ChunkManager::hasShardKey ( const BSONObj obj  ) 
bool mongo::ChunkManager::isUnique (  )  const [inline]

Definition at line 314 of file chunk.h.

void mongo::ChunkManager::maybeChunkCollection (  ) 
int mongo::ChunkManager::numChunks (  )  const [inline]

Definition at line 306 of file chunk.h.

string mongo::ChunkManager::toString (  )  const

Friends And Related Function Documentation

friend class Chunk [friend]

Definition at line 367 of file chunk.h.

friend class ChunkRangeManager [friend]

Definition at line 368 of file chunk.h.


Member Data Documentation

Definition at line 357 of file chunk.h.

Definition at line 358 of file chunk.h.

Definition at line 354 of file chunk.h.

RWLock mongo::ChunkManager::_lock [mutable, private]

Definition at line 364 of file chunk.h.

string mongo::ChunkManager::_ns [private]

Definition at line 353 of file chunk.h.

Definition at line 365 of file chunk.h.

unsigned long long mongo::ChunkManager::_sequenceNumber [private]

Definition at line 362 of file chunk.h.

Definition at line 360 of file chunk.h.

Definition at line 355 of file chunk.h.

Definition at line 369 of file chunk.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:54 2013