Modifier and Type | Field and Description |
---|---|
protected Map<String,Session> |
mSessions
Central repository of all running sessions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
close()
Closing the database for further access.
|
boolean |
createResource(ResourceConfiguration pResConf)
Initialization of a resource.
|
static boolean |
createStorage(StorageConfiguration pStorageConfig)
Creating a storage.
|
boolean |
existsResource(String pResourceName)
Is the resource within this database existing?
|
static boolean |
existsStorage(File pStoragePath)
Check if Storage exists or not at a given path.
|
File |
getLocation()
Getting the file location of this database.
|
ISession |
getSession(SessionConfiguration pSessionConf)
Getting the session associated within this database.
|
String[] |
listResources()
Listing all resources within this database.
|
static IStorage |
openStorage(File pFile)
Open database.
|
String |
toString() |
boolean |
truncateResource(SessionConfiguration pSesConf)
Truncating a resource.
|
static void |
truncateStorage(StorageConfiguration pConf)
Truncate a storage.
|
public static boolean createStorage(StorageConfiguration pStorageConfig) throws TTIOException
pStorageConfig
- which are used for the storage, including storage locationTTIOException
- if something odd happens within the creation process.public static void truncateStorage(StorageConfiguration pConf) throws TTException
pConf
- the storage at this path should be deleted.TTException
- any kind of false Treetank behaviourpublic static boolean existsStorage(File pStoragePath)
pStoragePath
- to be checked.public boolean createResource(ResourceConfiguration pResConf) throws TTException
createResource
in interface IStorage
pResConf
- the config of the resourceTTIOException
- if anything happens while creating the resourceTTException
public boolean truncateResource(SessionConfiguration pSesConf) throws TTException
truncateResource
in interface IStorage
pSesConf
- storing the name of the resourceTTException
- if anything weird happenspublic static IStorage openStorage(File pFile) throws TTException
pFile
- where the database is located sessionConf a SessionConfiguration
object to set up
the sessionIStorage
instance.TTException
- if something odd happenspublic ISession getSession(SessionConfiguration pSessionConf) throws TTException
getSession
in interface IStorage
pSessionConf
- SessionConfiguration
referenceTTException
- if can't get sessionpublic boolean close() throws TTException
close
in interface IStorage
TTException
- if anything happens within treetank.public boolean existsResource(String pResourceName)
existsResource
in interface IStorage
pResourceName
- ot be checkedpublic String[] listResources()
listResources
in interface IStorage
public File getLocation()
getLocation
in interface IStorage
Copyright © 2013. All Rights Reserved.