GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
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()

__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
43  {}

Member Function Documentation

◆ close()

close ( )
101 {}

◆ compactRange()

compactRange (   $start,
  $limit 
)
99 {}

◆ delete()

delete (   $key,
array  $write_options = [] 
)
Parameters
string$key
array$write_options
Returns
bool
75 {}

◆ destroy()

static destroy (   $name,
array  $options = [] 
)
static
115 {}

◆ get()

get (   $key,
array  $read_options = [] 
)
Parameters
string$key
array$read_options
Returns
string|bool
51 {}

◆ getApproximateSizes()

getApproximateSizes (   $start,
  $limit 
)
97 {}

◆ getIterator()

getIterator ( array  $options = [])
Parameters
array$options
Returns
LevelDBIterator
108 {}

◆ getProperty()

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
95 {}

◆ getSnapshot()

getSnapshot ( )
Returns
LevelDBSnapshot
113 {}

◆ put()

put (   $key,
  $value,
array  $write_options = [] 
)
Parameters
string$key
string$value
array$write_options
67 {}

◆ repair()

static repair (   $name,
array  $options = [] 
)
static
117 {}

◆ set()

set (   $key,
  $value,
array  $write_options = [] 
)

Alias of LevelDB::put()

Parameters
string$key
string$value
array$write_options
60 {}

◆ write()

write ( LevelDBWriteBatch  $batch,
array  $write_options = [] 
)

Executes all of the operations added in the write batch.

Parameters
LevelDBWriteBatch$batch
array$write_options
83 {}

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