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
Fields Modifier and Type Field Description static int
OPEN_STATE_CLEAR
static int
OPEN_STATE_ERROR
static int
OPEN_STATE_NEW
-
Method Summary
All Methods Instance Methods Abstract 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)
-
-
-
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
-
-