public class DerbyUtil extends Object
Constructor and Description |
---|
DerbyUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addActiveConnection(String id,
String path)
Registers a new active connection.
|
static void |
closeConnection()
Shuts Derby down completely thus releasing the file lock in the database
folder.
|
static OutputStream |
disabledDerbyLog()
Returns the disabled Derby log file.
|
static void |
disableDerbyLog()
Disable the derby log.
|
static ArrayList<String> |
getActiveConnectionsPaths(String id)
Returns the paths of the active connections for the given id.
|
static boolean |
isActiveConnection(String path)
Indicates whether a connection is active.
|
static boolean |
isActiveConnection(String id,
String path)
Indicates whether a connection is active.
|
static boolean |
isConnectionActive()
Returns whether the connection to Derby is active.
|
static void |
removeActiveConnection(String id,
String path)
Removes a connection from the registered connections.
|
static void |
setConnectionActive(boolean connectionActive)
Sets whether the connection to Derby is active.
|
public static void disableDerbyLog()
public static OutputStream disabledDerbyLog()
public static void closeConnection()
public static boolean isConnectionActive()
public static void setConnectionActive(boolean connectionActive)
connectionActive
- whether the connection to Derby is activepublic static void addActiveConnection(String id, String path)
id
- the id of this connectionpath
- the path used for this connectionpublic static ArrayList<String> getActiveConnectionsPaths(String id)
id
- the id of the connectionpublic static boolean isActiveConnection(String id, String path)
id
- the id of the connectionpath
- the path of the connectionpublic static boolean isActiveConnection(String path)
path
- the path of the connectionCopyright © 2016. All rights reserved.