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 voidaddIndex(KeyValueStorage kvs, String name)Register kvs index (builded on these database) in descriptions chainvoidattachStorage()Reopen file descriptors, used by databasevoidclose()Close database (with sync and correct close resources)voiddetachStorage()Close file descriptors, used by databsevoiddrop()Drop database (drop caches, detach and delete files)voiddropIndex(String name)Unregister index from descriptions chainITreeCachegetCache()Get database internal cacheEnginegetEngine()Get database internal engineKeyValueStoragegetIndex(String name)Get registered index by nameintgetIndexCount()Get total number of registered indexintgetNextSegmentId()Get first free (in these database) segment id.intgetOpenState()Get database open statusvoidsync()Sync complete database to file(s)
-
-
-
Constructor Detail
-
DatabaseInMemory
public DatabaseInMemory(ITreeCache cache)
-
-
Method Detail
-
sync
public void sync()
Description copied from interface:DatabaseSync complete database to file(s)
-
close
public void close()
Description copied from interface:DatabaseClose database (with sync and correct close resources)
-
detachStorage
public void detachStorage()
Description copied from interface:DatabaseClose file descriptors, used by databse- Specified by:
detachStoragein interfaceDatabase
-
attachStorage
public void attachStorage()
Description copied from interface:DatabaseReopen file descriptors, used by database- Specified by:
attachStoragein interfaceDatabase
-
dropIndex
public void dropIndex(String name)
Description copied from interface:DatabaseUnregister index from descriptions chain
-
addIndex
public void addIndex(KeyValueStorage kvs, String name)
Description copied from interface:DatabaseRegister kvs index (builded on these database) in descriptions chain
-
getIndex
public KeyValueStorage getIndex(String name)
Description copied from interface:DatabaseGet registered index by name
-
getCache
public ITreeCache getCache()
Description copied from interface:DatabaseGet database internal cache
-
getEngine
public Engine getEngine()
Description copied from interface:DatabaseGet database internal engine
-
getNextSegmentId
public int getNextSegmentId()
Description copied from interface:DatabaseGet first free (in these database) segment id. Method mark segment as used- Specified by:
getNextSegmentIdin interfaceDatabase- Returns:
- free segment id
-
getIndexCount
public int getIndexCount()
Description copied from interface:DatabaseGet total number of registered index- Specified by:
getIndexCountin interfaceDatabase- Returns:
-
drop
public void drop()
Description copied from interface:DatabaseDrop database (drop caches, detach and delete files)
-
getOpenState
public int getOpenState()
Description copied from interface:DatabaseGet database open status- Specified by:
getOpenStatein interfaceDatabase- Returns:
- database OPEN_STATE
-
-