Genisys  Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
LevelDB Class Reference

Public Member Functions

 __construct ($name, array $options=[ 'create_if_missing'=> true, 'error_if_exists'=> false, 'paranoid_checks'=> false, 'block_cache_size'=> 8 *(2<< 20), 'write_buffer_size'=> 4<< 20, 'block_size'=> 4096, 'max_open_files'=> 1000, 'block_restart_interval'=> 16, 'compression'=> LEVELDB_SNAPPY_COMPRESSION, 'comparator'=> NULL,], array $read_options=[ 'verify_check_sum'=> false, 'fill_cache'=> true,], array $write_options=[ 'sync'=> false])
 
 get ($key, array $read_options=[])
 
 set ($key, $value, array $write_options=[])
 
 put ($key, $value, array $write_options=[])
 
 delete ($key, array $write_options=[])
 
 write (LevelDBWriteBatch $batch, array $write_options=[])
 
 getProperty ($name)
 
 getApproximateSizes ($start, $limit)
 
 compactRange ($start, $limit)
 
 close ()
 
 getIterator (array $options=[])
 
 getSnapshot ()
 

Static Public Member Functions

static destroy ($name, array $options=[])
 
static repair ($name, array $options=[])
 

Constructor & Destructor Documentation

__construct (   $name,
array  $options = [ 'create_if_missing' =,
true  ,
'error_if_exists'  ,
false  ,
'paranoid_checks'  ,
false  ,
'block_cache_size'  ,
8 *  2<< 20,
'write_buffer_size'  ,
4<<  20,
'block_size'  ,
4096  ,
'max_open_files'  ,
1000  ,
'block_restart_interval'  ,
16  ,
'compression'  ,
LEVELDB_SNAPPY_COMPRESSION  ,
'comparator'  ,
NULL  ,
,
array  $read_options = [ 'verify_check_sum' =,
false  ,
'fill_cache'  ,
true  ,
,
array  $write_options = [  'sync' =,
false]   
)
Parameters
string$namePath to database
array$options
array$read_options
array$write_options

Member Function Documentation

delete (   $key,
array  $write_options = [] 
)
Parameters
string$key
array$write_options
Returns
bool
get (   $key,
array  $read_options = [] 
)
Parameters
string$key
array$read_options
Returns
string|bool
getIterator ( array  $options = [])
Parameters
array$options
Returns
LevelDBIterator
getProperty (   $name)

Valid properties:

  • leveldb.stats: returns the status of the entire db
  • leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level.
  • leveldb.sstables: returns current status of sstables
Parameters
string$name
Returns
mixed
getSnapshot ( )
put (   $key,
  $value,
array  $write_options = [] 
)
Parameters
string$key
string$value
array$write_options
set (   $key,
  $value,
array  $write_options = [] 
)

Alias of LevelDB::put()

Parameters
string$key
string$value
array$write_options
write ( LevelDBWriteBatch  $batch,
array  $write_options = [] 
)

Executes all of the operations added in the write batch.

Parameters
LevelDBWriteBatch$batch
array$write_options

The documentation for this class was generated from the following file: