|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.cluster.StoreManager
com.caucho.server.cluster.ClusterStoreManager
com.caucho.server.cluster.JdbcStore
public class JdbcStore
Storing sessions using a JDBC database as a backing store.
| Field Summary | |
|---|---|
protected javax.sql.DataSource |
_dataSource
|
| Fields inherited from class com.caucho.server.cluster.ClusterStoreManager |
|---|
log |
| Fields inherited from class com.caucho.server.cluster.StoreManager |
|---|
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap |
| Constructor Summary | |
|---|---|
JdbcStore()
Create a new JDBC backing store. |
|
| Method Summary | |
|---|---|
void |
accessImpl(java.lang.String uniqueId)
Updates the object's access time. |
void |
clearOldObjects()
Clears the old objects. |
boolean |
init()
Called after any factory settings. |
protected boolean |
load(ClusterObject clusterObj,
java.lang.Object obj)
Load the session from the jdbc store. |
void |
remove(ClusterObject obj)
Removes the named object from the store. |
void |
setBlobType(java.lang.String blobType)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setTableName(java.lang.String tableName)
|
boolean |
start()
Called to start the store. |
protected void |
store(ClusterObject obj,
TempStream tempStream,
long crc)
Save the object to the jdbc store. |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.server.cluster.ClusterStoreManager |
|---|
getPrimaryIndex, getPrimaryServer, getSecondaryIndex, getSecondaryServer, getTertiaryIndex, getTertiaryServer, ping, updateOwner |
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, classLoaderDestroy, classLoaderInit, createStore, destroy, environmentStart, environmentStop, getAccessWindowTime, getAdmin, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getObjectCount, getOwningServer, getSaveCount, getSaveFailCount, getSelfIndex, getServerList, getStore, handleAlarm, isAlwaysLoad, isAlwaysSave, isPrimary, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setExpireInterval, setMaxIdleTime, store, update, updateIdleCheckInterval |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected javax.sql.DataSource _dataSource
| Constructor Detail |
|---|
public JdbcStore()
| Method Detail |
|---|
public void setDataSource(javax.sql.DataSource dataSource)
public void setTableName(java.lang.String tableName)
public void setBlobType(java.lang.String blobType)
public boolean init()
throws java.lang.Exception
StoreManager
init in class StoreManagerjava.lang.Exception
public boolean start()
throws java.lang.Exception
StoreManager
start in class StoreManagerjava.lang.Exception
public void clearOldObjects()
throws java.sql.SQLException
clearOldObjects in class StoreManagerjava.sql.SQLException
protected boolean load(ClusterObject clusterObj,
java.lang.Object obj)
throws java.lang.Exception
load in class StoreManagerclusterObj - the cluster object to fill.obj - the object to update.
java.lang.Exception
protected void store(ClusterObject obj,
TempStream tempStream,
long crc)
throws java.lang.Exception
store in class StoreManagerobj - the object to store.tempStream - the stream containing the object's data
java.lang.Exception
public void accessImpl(java.lang.String uniqueId)
throws java.lang.Exception
accessImpl in class StoreManageruniqueId - the object id to update to store.
java.lang.Exception
public void remove(ClusterObject obj)
throws java.lang.Exception
remove in class StoreManagerobj - the object to remove
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||