Class: ladybug::Config
- Inherits:
-
Object
- Object
- ladybug::Config
- Defined in:
- ext/ladybug_ext/config.c
Instance Method Summary collapse
-
#auto_checkpoint ⇒ Boolean
Return the auto_checkpoint config value.
-
#auto_checkpoint=(true) ⇒ Object
Set the auto_checkpoint config value.
-
#buffer_pool_size ⇒ Integer
Return the buffer_pool_size config value.
-
#buffer_pool_size=(integer) ⇒ Object
Set the buffer_pool_size config value.
-
#checkpoint_threshold ⇒ Integer
Return the checkpoint_threshold config value.
-
#checkpoint_threshold=(integer) ⇒ Object
Set the checkpoint_threshold config value.
-
#enable_checksums ⇒ Boolean
Return the enable_checksums config value.
-
#enable_checksums=(true) ⇒ Object
Set the enable_checksums config value.
-
#enable_compression ⇒ Boolean
Return the enable_compression config value.
-
#enable_compression=(true) ⇒ Object
Set the enable_compression config value.
-
#enable_default_hash_index ⇒ Boolean
Return the enable_default_hash_index config value.
-
#enable_default_hash_index=(true) ⇒ Object
Set the enable_default_hash_index config value.
-
#enable_multi_writes ⇒ Boolean
Return the enable_multi_writes config value.
-
#enable_multi_writes=(true) ⇒ Object
Set the enable_multi_writes config value.
-
#new ⇒ Object
constructor
Create a Ladybug::Config with default values.
-
#max_db_size ⇒ Integer
Return the max_db_size config value.
-
#max_db_size=(integer) ⇒ Object
Set the max_db_size config value.
-
#max_num_threads ⇒ Integer
Return the max_num_threads config value.
-
#max_num_threads=(integer) ⇒ Object
Set the max_num_threads config value.
-
#read_only ⇒ Boolean
Return the read_only config value.
-
#read_only=(true) ⇒ Object
Set the read_only config value.
-
#throw_on_wal_replay_failure ⇒ Boolean
Return the throw_on_wal_replay_failure config value.
-
#throw_on_wal_replay_failure=(true) ⇒ Object
Set the throw_on_wal_replay_failure config value.
Constructor Details
#new ⇒ Object
Create a Ladybug::Config with default values.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'ext/ladybug_ext/config.c', line 46
static VALUE
rlbug_config_initialize( VALUE self )
{
lbug_system_config *ptr = CHECK_CONFIG( self );
if ( !ptr ) {
ptr = ALLOC( lbug_system_config );
lbug_system_config defaults = lbug_default_system_config();
ptr->buffer_pool_size = defaults.buffer_pool_size;
ptr->max_num_threads = defaults.max_num_threads;
ptr->enable_compression = defaults.enable_compression;
ptr->read_only = defaults.read_only;
ptr->max_db_size = defaults.max_db_size;
ptr->auto_checkpoint = defaults.auto_checkpoint;
ptr->checkpoint_threshold = defaults.checkpoint_threshold;
ptr->throw_on_wal_replay_failure = defaults.throw_on_wal_replay_failure;
ptr->enable_checksums = defaults.enable_checksums;
ptr->enable_multi_writes = defaults.enable_multi_writes;
ptr->enable_default_hash_index = defaults.enable_default_hash_index;
RTYPEDDATA_DATA( self ) = ptr;
} else {
rb_raise( rb_eRuntimeError, "cannot reinit config" );
}
rb_call_super( 0, 0 );
return Qtrue;
}
|
Instance Method Details
#auto_checkpoint ⇒ Boolean
Return the auto_checkpoint config value.
154 155 156 157 158 159 |
# File 'ext/ladybug_ext/config.c', line 154
static VALUE
rlbug_config_auto_checkpoint( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->auto_checkpoint ? Qtrue : Qfalse;
}
|
#auto_checkpoint=(true) ⇒ Object
Set the auto_checkpoint config value.
318 319 320 321 322 323 324 325 |
# File 'ext/ladybug_ext/config.c', line 318
static VALUE
rlbug_config_auto_checkpoint_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->auto_checkpoint = RTEST( value );
return Qtrue;
}
|
#buffer_pool_size ⇒ Integer
Return the buffer_pool_size config value.
84 85 86 87 88 89 |
# File 'ext/ladybug_ext/config.c', line 84
static VALUE
rlbug_config_buffer_pool_size( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return ULONG2NUM( config->buffer_pool_size );
}
|
#buffer_pool_size=(integer) ⇒ Object
Set the buffer_pool_size config value.
238 239 240 241 242 243 244 245 |
# File 'ext/ladybug_ext/config.c', line 238
static VALUE
rlbug_config_buffer_pool_size_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->buffer_pool_size = NUM2ULONG( value );
return Qtrue;
}
|
#checkpoint_threshold ⇒ Integer
Return the checkpoint_threshold config value.
168 169 170 171 172 173 |
# File 'ext/ladybug_ext/config.c', line 168
static VALUE
rlbug_config_checkpoint_threshold( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return ULONG2NUM( config->checkpoint_threshold );
}
|
#checkpoint_threshold=(integer) ⇒ Object
Set the checkpoint_threshold config value.
334 335 336 337 338 339 340 341 |
# File 'ext/ladybug_ext/config.c', line 334
static VALUE
rlbug_config_checkpoint_threshold_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->checkpoint_threshold = NUM2ULONG( value );
return Qtrue;
}
|
#enable_checksums ⇒ Boolean
Return the enable_checksums config value.
196 197 198 199 200 201 |
# File 'ext/ladybug_ext/config.c', line 196
static VALUE
rlbug_config_enable_checksums( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->enable_checksums ? Qtrue : Qfalse;
}
|
#enable_checksums=(true) ⇒ Object
Set the enable_checksums config value.
366 367 368 369 370 371 372 373 |
# File 'ext/ladybug_ext/config.c', line 366
static VALUE
rlbug_config_enable_checksums_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->enable_checksums = RTEST( value );
return Qtrue;
}
|
#enable_compression ⇒ Boolean
Return the enable_compression config value.
112 113 114 115 116 117 |
# File 'ext/ladybug_ext/config.c', line 112
static VALUE
rlbug_config_enable_compression( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->enable_compression ? Qtrue : Qfalse;
}
|
#enable_compression=(true) ⇒ Object
Set the enable_compression config value.
270 271 272 273 274 275 276 277 |
# File 'ext/ladybug_ext/config.c', line 270
static VALUE
rlbug_config_enable_compression_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->enable_compression = RTEST( value );
return Qtrue;
}
|
#enable_default_hash_index ⇒ Boolean
Return the enable_default_hash_index config value.
224 225 226 227 228 229 |
# File 'ext/ladybug_ext/config.c', line 224
static VALUE
rlbug_config_enable_default_hash_index( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->enable_default_hash_index ? Qtrue : Qfalse;
}
|
#enable_default_hash_index=(true) ⇒ Object
Set the enable_default_hash_index config value.
398 399 400 401 402 403 404 405 |
# File 'ext/ladybug_ext/config.c', line 398
static VALUE
rlbug_config_enable_default_hash_index_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->enable_default_hash_index = RTEST( value );
return Qtrue;
}
|
#enable_multi_writes ⇒ Boolean
Return the enable_multi_writes config value.
210 211 212 213 214 215 |
# File 'ext/ladybug_ext/config.c', line 210
static VALUE
rlbug_config_enable_multi_writes( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->enable_multi_writes ? Qtrue : Qfalse;
}
|
#enable_multi_writes=(true) ⇒ Object
Set the enable_multi_writes config value.
382 383 384 385 386 387 388 389 |
# File 'ext/ladybug_ext/config.c', line 382
static VALUE
rlbug_config_enable_multi_writes_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->enable_multi_writes = RTEST( value );
return Qtrue;
}
|
#max_db_size ⇒ Integer
Return the max_db_size config value.
140 141 142 143 144 145 |
# File 'ext/ladybug_ext/config.c', line 140
static VALUE
rlbug_config_max_db_size( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return ULONG2NUM( config->max_db_size );
}
|
#max_db_size=(integer) ⇒ Object
Set the max_db_size config value.
302 303 304 305 306 307 308 309 |
# File 'ext/ladybug_ext/config.c', line 302
static VALUE
rlbug_config_max_db_size_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->max_db_size = NUM2ULONG( value );
return Qtrue;
}
|
#max_num_threads ⇒ Integer
Return the max_num_threads config value.
98 99 100 101 102 103 |
# File 'ext/ladybug_ext/config.c', line 98
static VALUE
rlbug_config_max_num_threads( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return ULONG2NUM( config->max_num_threads );
}
|
#max_num_threads=(integer) ⇒ Object
Set the max_num_threads config value.
254 255 256 257 258 259 260 261 |
# File 'ext/ladybug_ext/config.c', line 254
static VALUE
rlbug_config_max_num_threads_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->max_num_threads = NUM2ULONG( value );
return Qtrue;
}
|
#read_only ⇒ Boolean
Return the read_only config value.
126 127 128 129 130 131 |
# File 'ext/ladybug_ext/config.c', line 126
static VALUE
rlbug_config_read_only( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->read_only ? Qtrue : Qfalse;
}
|
#read_only=(true) ⇒ Object
Set the read_only config value.
286 287 288 289 290 291 292 293 |
# File 'ext/ladybug_ext/config.c', line 286
static VALUE
rlbug_config_read_only_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->read_only = RTEST( value );
return Qtrue;
}
|
#throw_on_wal_replay_failure ⇒ Boolean
Return the throw_on_wal_replay_failure config value.
182 183 184 185 186 187 |
# File 'ext/ladybug_ext/config.c', line 182
static VALUE
rlbug_config_throw_on_wal_replay_failure( VALUE self )
{
lbug_system_config *config = CHECK_CONFIG( self );
return config->throw_on_wal_replay_failure ? Qtrue : Qfalse;
}
|
#throw_on_wal_replay_failure=(true) ⇒ Object
Set the throw_on_wal_replay_failure config value.
350 351 352 353 354 355 356 357 |
# File 'ext/ladybug_ext/config.c', line 350
static VALUE
rlbug_config_throw_on_wal_replay_failure_eq( VALUE self, VALUE value )
{
lbug_system_config *config = CHECK_CONFIG( self );
config->throw_on_wal_replay_failure = RTEST( value );
return Qtrue;
}
|