|
InnoDB Plugin
1.0
|
#include <ut0counter.h>
Public Member Functions | |
| bool | validate () UNIV_NOTHROW |
| void | inc () UNIV_NOTHROW |
| void | add (Type n) UNIV_NOTHROW |
| void | add (size_t index, Type n) UNIV_NOTHROW |
| void | dec () UNIV_NOTHROW |
| void | sub (Type n) UNIV_NOTHROW |
| void | sub (size_t index, Type n) UNIV_NOTHROW |
| operator Type () const UNIV_NOTHROW | |
Private Attributes | |
| Indexer< Type, N > | m_policy |
| Type | m_counter [(N+1)*(CACHE_LINE_SIZE/sizeof(Type))] |
Class for using fuzzy counters. The counter is not protected by any
mutex and the results are not guaranteed to be 100% accurate but close enough. Creates an array of counters and separates each element by the CACHE_LINE_SIZE bytes
|
inline |
If you can't use a good index id.
| n | - is the amount to increment |
|
inline |
Use this if you can use a unique indentifier, saves a
call to get_rnd_index().
| i | - index into a slot |
| n | - amount to increment |
|
inline |
If you can't use a good index id. Decrement by 1.
|
inline |
If you can't use a good index id. Increment by 1.
|
inline |
If you can't use a good index id.
| - | n is the amount to decrement |
|
inline |
Use this if you can use a unique indentifier, saves a
call to get_rnd_index().
| i | - index into a slot |
| n | - amount to decrement |
|
private |
Slot 0 is unused.
|
private |
Indexer into the array
1.8.1.2