|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.jchem.db.CacheRegistrationBase
chemaxon.jchem.db.CacheRegistrationUtil
public class CacheRegistrationUtil
Utility class for cache registration.
| Field Summary | |
|---|---|
static java.lang.String |
CACHE_REGISTRATION_SENSITIVITY_EXCEPTION
Error sensitivity - exception. |
static java.lang.String |
CACHE_REGISTRATION_SENSITIVITY_LOG
Error sensitivity - log |
static java.lang.String |
CACHE_REGISTRATION_SENSITIVITY_NONE
Error sensitivity - none. |
protected static java.lang.String |
cacheID
|
protected static boolean |
permanent
|
static java.lang.String |
PROP_CACHE_REGISTRATION_SENSITIVITY
Property name that shows cache registration error sensitivity. |
| Fields inherited from class chemaxon.jchem.db.CacheRegistrationBase |
|---|
CACHE_ID_FIELD_NAME, CACHE_ID_LENGTH, CACHE_PROTECTED_FIELD_NAME, CACHE_TIME_FIELD_NAME, CACHE_UPDATE_ID_FIELD_NAME, CACHE_UPDATE_INFO_FIELD_NAME, cacheTable, con, PROP_CACHE_REGISTRATION_TABLE_NAME, PROP_CACHE_VALIDITY_TIMESTAMP, propertyTable |
| Constructor Summary | |
|---|---|
CacheRegistrationUtil(ConnectionHandler conh)
|
|
| Method Summary | |
|---|---|
protected void |
addTimestamp(java.lang.String timestamp,
java.sql.Connection c)
|
static java.lang.String |
getCacheID()
|
protected java.lang.String |
getCacheRegisterer(java.lang.String registerTablename,
java.lang.String cacheID,
java.lang.String timestamp,
boolean isProtected)
|
java.util.ArrayList |
getRegisteredCacheIDs()
For internal use only! |
protected java.lang.String |
getTimestamp(java.sql.Connection c)
|
boolean |
isCacheIDRegistered(java.lang.String cacheID)
Checks whether a cache identifier is currently registered or not. |
static boolean |
isPermanent()
|
void |
registerCache()
Registers the cache. |
void |
registerPermanentCache(java.lang.String cacheID)
Registers a permanent cache identifier. |
static void |
resetCacheID()
|
static void |
setPermanentCacheID(java.lang.String cacheIdentifier)
Sets the ID used for identifying the permanent cache. |
protected boolean |
timestampExists(java.sql.Connection c)
|
void |
unRegisterCache()
Unregisters the cache. |
void |
unRegisterCache(java.lang.String cacheID)
Unregisters the given cache identifier. |
protected void |
updateTimestamp(java.lang.String timestamp,
java.sql.Connection c)
|
| Methods inherited from class chemaxon.jchem.db.CacheRegistrationBase |
|---|
getCacheRegistrationInfos |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_CACHE_REGISTRATION_SENSITIVITY
public static final java.lang.String CACHE_REGISTRATION_SENSITIVITY_EXCEPTION
public static final java.lang.String CACHE_REGISTRATION_SENSITIVITY_LOG
public static final java.lang.String CACHE_REGISTRATION_SENSITIVITY_NONE
protected static java.lang.String cacheID
protected static boolean permanent
| Constructor Detail |
|---|
public CacheRegistrationUtil(ConnectionHandler conh)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public void registerCache()
throws java.sql.SQLException
setPermanentCacheID(String) was called before, otherwise temporary.
java.sql.SQLException
public void registerPermanentCache(java.lang.String cacheID)
throws java.sql.SQLException
cacheID - cache identifier to be registered
java.sql.SQLException
public void unRegisterCache()
throws java.sql.SQLException
java.sql.SQLException
public void unRegisterCache(java.lang.String cacheID)
throws java.sql.SQLException
cacheID - cache identifier to unregister
java.sql.SQLException
protected boolean timestampExists(java.sql.Connection c)
throws java.sql.SQLException
java.sql.SQLException
public java.util.ArrayList getRegisteredCacheIDs()
throws java.sql.SQLException
java.sql.SQLException
public boolean isCacheIDRegistered(java.lang.String cacheID)
throws java.sql.SQLException
cacheID - ID to check.
true if the cache identifier is registered.
java.sql.SQLException
protected java.lang.String getTimestamp(java.sql.Connection c)
throws java.sql.SQLException
java.sql.SQLException
protected void addTimestamp(java.lang.String timestamp,
java.sql.Connection c)
throws java.sql.SQLException
java.sql.SQLException
protected void updateTimestamp(java.lang.String timestamp,
java.sql.Connection c)
throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String getCacheRegisterer(java.lang.String registerTablename,
java.lang.String cacheID,
java.lang.String timestamp,
boolean isProtected)
public static void setPermanentCacheID(java.lang.String cacheIdentifier)
throws java.lang.IllegalArgumentException
cacheIdentifier - the cache ID to set. Should not be null,
and it's length must be between 1 and 32, inclusive.
java.lang.IllegalArgumentExceptionpublic static java.lang.String getCacheID()
public static boolean isPermanent()
public static void resetCacheID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||