Package com._1c.g5.v8.xmdb
Interface Database
- All Known Implementing Classes:
DatabaseImpl,DatabaseInMemory
public interface Database
Database store unlimit number of index, manage engines and so on...
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndex(KeyValueStorage kvs, String name) Register kvs index (builded on these database) in descriptions chainvoidReopen file descriptors, used by databasevoidclose()Close database (with sync and correct close resources)voidClose file descriptors, used by databsevoiddrop()Drop database (drop caches, detach and delete files)voidUnregister index from descriptions chaingetCache()Get database internal cacheGet database internal engineGet registered index by nameintGet total number of registered indexintGet first free (in these database) segment id.intGet database open statusvoidsync()Sync complete database to file(s)
-
Field Details
-
OPEN_STATE_CLEAR
static final int OPEN_STATE_CLEAR- See Also:
-
OPEN_STATE_NEW
static final int OPEN_STATE_NEW- See Also:
-
OPEN_STATE_ERROR
static final int OPEN_STATE_ERROR- See Also:
-
-
Method Details
-
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
Unregister index from descriptions chain- Parameters:
name-
-
addIndex
Register kvs index (builded on these database) in descriptions chain- Parameters:
kvs- index to register
-
getIndex
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
-