Package com._1c.g5.v8.xmdb.impl
Class DatabaseInMemory
- java.lang.Object
-
- com._1c.g5.v8.xmdb.impl.DatabaseInMemory
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.xmdb.Database
OPEN_STATE_CLEAR, OPEN_STATE_ERROR, OPEN_STATE_NEW
-
-
Constructor Summary
Constructors Constructor Description DatabaseInMemory(ITreeCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIndex(KeyValueStorage kvs, String name)
Register kvs index (builded on these database) in descriptions chainvoid
attachStorage()
Reopen file descriptors, used by databasevoid
close()
Close database (with sync and correct close resources)void
detachStorage()
Close file descriptors, used by databsevoid
drop()
Drop database (drop caches, detach and delete files)void
dropIndex(String name)
Unregister index from descriptions chainITreeCache
getCache()
Get database internal cacheEngine
getEngine()
Get database internal engineKeyValueStorage
getIndex(String name)
Get registered index by nameint
getIndexCount()
Get total number of registered indexint
getNextSegmentId()
Get first free (in these database) segment id.int
getOpenState()
Get database open statusvoid
sync()
Sync complete database to file(s)
-
-
-
Constructor Detail
-
DatabaseInMemory
public DatabaseInMemory(ITreeCache cache)
-
-
Method Detail
-
sync
public void sync()
Description copied from interface:Database
Sync complete database to file(s)
-
close
public void close()
Description copied from interface:Database
Close database (with sync and correct close resources)
-
detachStorage
public void detachStorage()
Description copied from interface:Database
Close file descriptors, used by databse- Specified by:
detachStorage
in interfaceDatabase
-
attachStorage
public void attachStorage()
Description copied from interface:Database
Reopen file descriptors, used by database- Specified by:
attachStorage
in interfaceDatabase
-
dropIndex
public void dropIndex(String name)
Description copied from interface:Database
Unregister index from descriptions chain
-
addIndex
public void addIndex(KeyValueStorage kvs, String name)
Description copied from interface:Database
Register kvs index (builded on these database) in descriptions chain
-
getIndex
public KeyValueStorage getIndex(String name)
Description copied from interface:Database
Get registered index by name
-
getCache
public ITreeCache getCache()
Description copied from interface:Database
Get database internal cache
-
getEngine
public Engine getEngine()
Description copied from interface:Database
Get database internal engine
-
getNextSegmentId
public int getNextSegmentId()
Description copied from interface:Database
Get first free (in these database) segment id. Method mark segment as used- Specified by:
getNextSegmentId
in interfaceDatabase
- Returns:
- free segment id
-
getIndexCount
public int getIndexCount()
Description copied from interface:Database
Get total number of registered index- Specified by:
getIndexCount
in interfaceDatabase
- Returns:
-
drop
public void drop()
Description copied from interface:Database
Drop database (drop caches, detach and delete files)
-
getOpenState
public int getOpenState()
Description copied from interface:Database
Get database open status- Specified by:
getOpenState
in interfaceDatabase
- Returns:
- database OPEN_STATE
-
-