public final class KernelAdminConnection extends AbstractAdminConnection
NO_TIMEOUT| Constructor and Description |
|---|
KernelAdminConnection(com.complexible.stardog.Kernel theKernel,
org.apache.shiro.subject.Subject theSubject,
Options theOptions,
Views<AdminConnection> theViews) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_close() |
protected Metadata |
_get(String theName,
Iterable<? extends MetaProperty<?>> theOptions) |
protected <T> String |
_set(String theName,
MetaProperty<T> theOption,
T theValue) |
String |
backup(String theDatabase)
Create a backup of the given database to the default location.
|
String |
backup(String theDatabase,
File theLocation)
Create a backup of the given database in the specified location.
|
String |
backup(String theDatabase,
String theLocation) |
String |
backupAll(File theLocation)
Create a backup of the given database in the specified location.
|
<T> T |
call(Callable<T> theAction) |
Map<String,Object> |
currentStatus(boolean theIncludeDbStatus)
Return the DBMS status information, including Server/Protocols running, Stardog Home path, OS, etc
|
String |
drop(String theName)
Drop the database with the given name.
|
PermissionManager |
getPermissionManager()
Return the
PermissionManager for changing user & role permissions |
QueryManager |
getQueryManager()
Return the
QueryManager for managing running queries |
RoleManager |
getRoleManager()
Return the
RoleManager to be used for role-centric security changes |
com.complexible.stardog.StoredFunctions |
getStoredFunctions()
Returns the stored functions in this server.
|
StoredQueries |
getStoredQueries()
Returns the stored queries in this server.
|
UserManager |
getUserManager()
Return the
UserManager to be used for user-centric security changes |
Collection<String> |
list()
List all of the databases in the Stardog server
|
DatabaseBuilder |
newDatabaseBuilder() |
String |
offline(String theName,
long theTime,
TimeUnit theTimeUnit)
Take the database offline waiting up to the specified timeout before performing a hard off-line.
|
String |
online(String theName)
Makes the database online according to the default strategy
|
String |
optimize(String theName,
Metadata theOptions)
Optimizes the indexes of a given database for query answering and disk utilization after the database has been heavily modified.
|
String |
repair(String theName)
Repairs the specified database if it is corrupted.
|
String |
restore(File theBackup,
boolean theOverwrite,
String theName)
Restore the database backed up to the given location
|
String |
restore(String theBackup,
boolean theOverwrite,
String theName) |
String |
restoreAll(File theBackup)
Restore the database backed up to the given location
|
void |
run(Runnable theAction) |
void |
shutdown()
Shutdown the remote Stardog server.
|
as, assertOpen, assertValidName, builder, close, disk, get, get, isOpen, newDatabase, offline, setclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoptimizepublic KernelAdminConnection(com.complexible.stardog.Kernel theKernel,
org.apache.shiro.subject.Subject theSubject,
Options theOptions,
Views<AdminConnection> theViews)
protected void _close()
_close in class AbstractAdminConnectionpublic DatabaseBuilder newDatabaseBuilder()
newDatabaseBuilder in class AbstractAdminConnectionprotected Metadata _get(String theName, Iterable<? extends MetaProperty<?>> theOptions) throws StardogException
_get in class AbstractAdminConnectionStardogExceptionprotected <T> String _set(String theName, MetaProperty<T> theOption, T theValue) throws StardogException
_set in class AbstractAdminConnectionStardogExceptionpublic String offline(String theName, long theTime, TimeUnit theTimeUnit) throws StardogException
Take the database offline waiting up to the specified timeout before performing a hard off-line. A database going offline will allow open connections to complete, but will not accept new, incoming connections.
Offline databases cannot be queried or updated and will be unaccessible to users.
Specifying a timeout of 0 will immediately shut down the database severing all open connections, i.e. a hard shutdown.
theName - name of the databasetheTime - timeout duration, must be a positive numbertheTimeUnit - the unit of time for the timeout, cannot be nullStardogException - if there was an error while offlining the databasepublic String online(String theName) throws StardogException
theName - the name of the databaseStardogException - if there was an error while onlining the databasepublic String optimize(String theName, Metadata theOptions) throws StardogException
Optimization will NOT modify the database contents. The data layout, indexes and other internal structures might change but the data stored in the database will remain same.
theName - the name of the database to optimizetheOptions - options specifying the specific optimization steps to perform or empty for default optimizationsStardogException - if an error occurs during optimizationpublic Collection<String> list() throws StardogException
StardogException - if there was an error getting the listpublic String repair(String theName) throws StardogException
theName - the name of the database to repairStardogException - if there was an error while repairingpublic void shutdown()
throws com.complexible.stardog.security.StardogSecurityException
com.complexible.stardog.security.StardogSecurityException - if you are attempting to shut down
the embedded server or if you are not a
super-user and are trying to shut down a
remote server.public String drop(String theName) throws StardogException
theName - the name of the database to dropStardogException - if there was an error while dropping the databasepublic String backup(String theDatabase) throws StardogException
theDatabase - the name of the database to back upStardogException - if there is an error performing the backup.public String backup(String theDatabase, String theLocation) throws StardogException
StardogExceptionpublic String backup(String theDatabase, File theLocation) throws StardogException
theDatabase - the name of the database to back uptheLocation - where to store the backupStardogException - if there is an error performing the backup.public String backupAll(File theLocation) throws StardogException
AdminConnectiontheLocation - where to store the backupStardogException - if there is an error performing the backup.public String restore(File theBackup, boolean theOverwrite, String theName) throws StardogException
theBackup - the location of the backuptheOverwrite - whether or not to overwrite any existing databasetheName - a new name for the restored databaseStardogException - if there was an error restoring the database from a backuppublic String restore(String theBackup, boolean theOverwrite, String theName) throws StardogException
StardogExceptionpublic String restoreAll(File theBackup) throws StardogException
AdminConnectiontheBackup - the location of the backupStardogException - if there was an error restoring the database from a backuppublic UserManager getUserManager()
UserManager to be used for user-centric security changespublic RoleManager getRoleManager()
RoleManager to be used for role-centric security changespublic PermissionManager getPermissionManager()
PermissionManager for changing user & role permissionspublic QueryManager getQueryManager()
QueryManager for managing running queriespublic Map<String,Object> currentStatus(boolean theIncludeDbStatus) throws StardogException
theIncludeDbStatus - StardogException - if there was an error retrieving the DBMS infopublic StoredQueries getStoredQueries()
public com.complexible.stardog.StoredFunctions getStoredFunctions()
public void run(Runnable theAction)
public <T> T call(Callable<T> theAction)
Copyright © 2010-2016 Stardog Union. All Rights Reserved.