Package overit.geocall.sql
Class DBTable
java.lang.Object
overit.geocall.sql.DBTable
- All Implemented Interfaces:
Serializable
This class implements the object that defines a DataBase table.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic voidclearTables(boolean forward) Clears all the tablesstatic voidclearTables(String pool, String table, Long factory) Clears all the tables and send the Invalidation message to all the tables and Nodes of the Clusterstatic voidclearTables(String pool, String table, Long factory, boolean forward) Clears all the tablesReturns the cache DBViewgetCacheElement(String key) Returns the chache element associated to the keygetCacheElement(String key, BiFunction<? super String, ? super DBView, ? extends DBView> computation) Returns the chache element associated to the keyintReturns the cache sizestatic DBTablegetDBTable(String pool, String table, Long factory) Returns theDBTableReturns the factorylongReturns the load after valueReturns the pool nameprotected static StringgetTableKey(String pool, String table, Long factory) Returns the table keyReturns the table namestatic DBViewReturns the tablesDBViewvoidsetCacheElement(String key, Object object) Deprecated.static voiduseCache(boolean usecache) Sets the use cache capabilitystatic booleanReturnstrueif is using the cache,falseotherwise
-
Field Details
-
_usingCache
protected static boolean _usingCache -
_hmTables
-
_factorySet
-
_pool
-
_table
-
_factory
-
_loadAfter
protected long _loadAfter -
cache
-
-
Constructor Details
-
DBTable
Main constructor for DBTable- Parameters:
pool- The pooltable- The tablefactory- The factory
-
-
Method Details
-
usingCache
public static boolean usingCache()Returnstrueif is using the cache,falseotherwise- Returns:
trueif is using the cache,falseotherwise
-
useCache
public static void useCache(boolean usecache) Sets the use cache capability- Parameters:
usecache- Boolean value indicating if use cache capability should be enabled
-
getTableKey
Returns the table key- Parameters:
pool- The pooltable- The tablefactory- The factory- Returns:
- A string containing the table key
-
getDBTable
Returns theDBTable- Parameters:
pool- The pooltable- The tablefactory- The factory- Returns:
- The
DBTable
-
clearTables
public static void clearTables(boolean forward) Clears all the tables- Parameters:
forward- Boolean values that indicate if the Invalidation message should be sent to all the tables and Nodes of the Cluster
-
clearTables
Clears all the tables and send the Invalidation message to all the tables and Nodes of the Cluster- Parameters:
pool- The pooltable- The tablefactory- The factory
-
clearTables
Clears all the tables- Parameters:
pool- The pooltable- The tablefactory- The factoryforward- Boolean values that indicate if the Invalidation message should be sent to all the tables and Nodes of the Cluster
-
clearCache
protected void clearCache() -
getTablesDBView
Returns the tablesDBView- Returns:
- The tables
DBView
-
getLoadAfter
public long getLoadAfter()Returns the load after value- Returns:
- The load after value
-
getTableName
Returns the table name- Returns:
- The table name
-
getPoolName
Returns the pool name- Returns:
- The pool name
-
getFactory
Returns the factory- Returns:
- The factory
-
getCacheElement
public DBView getCacheElement(String key, BiFunction<? super String, ? super DBView, ? extends DBView> computation) Returns the chache element associated to the key- Parameters:
key- The key used to get the cache elementcomputation- the function used to test and accept or test and recreate the correct map value to be returned- Returns:
- THe cache element
-
getCacheElement
Returns the chache element associated to the key- Parameters:
key- The key used to get the cache element- Returns:
- THe cache element
-
setCacheElement
Deprecated.Sets the cache element- Parameters:
key- The key associated to the objectobject- The object
-
getCacheSize
public int getCacheSize()Returns the cache size- Returns:
- The cache size
-
getCacheDBView
Returns the cache DBView- Returns:
- The
DBView
-