Package com._1c.g5.v8.xmdb.impl
Class DatabaseImpl
- java.lang.Object
-
- com._1c.g5.v8.xmdb.impl.DatabaseImpl
-
-
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 DatabaseImpl()
Deprecated.DatabaseImpl(Engine engine, ITreeCache cache, boolean lazySync, boolean openTest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIndex(KeyValueStorage kvs, String name)
Insert kvs into descriptorsvoid
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)
Remove index from descriptorsITreeCache
getCache()
Get database internal cacheMap<String,IndexDescriptor>
getDescriptors()
Engine
getEngine()
Get database internal engineKeyValueStorage
getIndex(String name)
Get registered index by nameint
getIndexCount()
Get total number of registered indexIndexDescriptor
getLastDescriptor()
int
getNextSegmentId()
Get first free (in these database) segment id.int
getOpenState()
Get database open statusvoid
setCache(TreeCacheReal cache)
void
setDescriptors(Map<String,IndexDescriptor> descriptors)
void
setEngine(Engine engine)
void
setLastDescriptor(IndexDescriptor lastDescriptor)
void
sync()
Sync complete database to file(s)
-
-
-
Constructor Detail
-
DatabaseImpl
@Deprecated public DatabaseImpl()
Deprecated.
-
DatabaseImpl
public DatabaseImpl(Engine engine, ITreeCache cache, boolean lazySync, boolean openTest)
-
-
Method Detail
-
getIndex
public KeyValueStorage getIndex(String name)
Description copied from interface:Database
Get registered index by name
-
addIndex
public void addIndex(KeyValueStorage kvs, String name)
Insert kvs into descriptors
-
dropIndex
public void dropIndex(String name)
Remove index from descriptors
-
getEngine
public Engine getEngine()
Description copied from interface:Database
Get database internal engine
-
setEngine
public void setEngine(Engine engine)
-
getCache
public ITreeCache getCache()
Description copied from interface:Database
Get database internal cache
-
setCache
public void setCache(TreeCacheReal cache)
-
getDescriptors
public Map<String,IndexDescriptor> getDescriptors()
-
setDescriptors
public void setDescriptors(Map<String,IndexDescriptor> descriptors)
-
getLastDescriptor
public IndexDescriptor getLastDescriptor()
-
setLastDescriptor
public void setLastDescriptor(IndexDescriptor lastDescriptor)
-
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
-
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
-
-