Package com._1c.g5.v8.xmdb
Interface Database
-
- All Known Implementing Classes:
DatabaseImpl,DatabaseInMemory
public interface DatabaseDatabase store unlimit number of index, manage engines and so on...
-
-
Field Summary
Fields Modifier and Type Field Description static intOPEN_STATE_CLEARstatic intOPEN_STATE_ERRORstatic intOPEN_STATE_NEW
-
Method Summary
All Methods Instance Methods Abstract 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)
-
-
-
Field Detail
-
OPEN_STATE_CLEAR
static final int OPEN_STATE_CLEAR
- See Also:
- Constant Field Values
-
OPEN_STATE_NEW
static final int OPEN_STATE_NEW
- See Also:
- Constant Field Values
-
OPEN_STATE_ERROR
static final int OPEN_STATE_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
sync
void sync()
Sync complete database to file(s)
-
close
void close()
Close database (with sync and correct close resources)
-
detachStorage
void detachStorage()
Close file descriptors, used by databse
-
attachStorage
void attachStorage()
Reopen file descriptors, used by database
-
dropIndex
void dropIndex(String name)
Unregister index from descriptions chain- Parameters:
name-
-
addIndex
void addIndex(KeyValueStorage kvs, String name)
Register kvs index (builded on these database) in descriptions chain- Parameters:
kvs- index to register
-
getIndex
KeyValueStorage getIndex(String name)
Get registered index by name- Parameters:
name- index name- Returns:
- index or null (if it doesn't registered)
-
getCache
ITreeCache getCache()
Get database internal cache- Returns:
- database cache
-
getEngine
Engine getEngine()
Get database internal engine- Returns:
- database engine
-
getNextSegmentId
int getNextSegmentId()
Get first free (in these database) segment id. Method mark segment as used- Returns:
- free segment id
-
getIndexCount
int getIndexCount()
Get total number of registered index- Returns:
-
drop
void drop()
Drop database (drop caches, detach and delete files)
-
getOpenState
int getOpenState()
Get database open status- Returns:
- database OPEN_STATE
-
-