|
||||||||||
| 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.AbstractClusterStoreManager
com.caucho.server.cluster.JdbcStoreManager
public class JdbcStoreManager
Storing sessions using a JDBC database as a backing objectStore.
| Field Summary | |
|---|---|
protected javax.sql.DataSource |
_dataSource
|
| Fields inherited from class com.caucho.server.cluster.StoreManager |
|---|
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap |
| Constructor Summary | |
|---|---|
JdbcStoreManager()
Create a new JDBC backing objectStore. |
|
| Method Summary | |
|---|---|
void |
accessImpl(HashKey objectId)
Updates the object's objectAccess 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 objectStore. |
void |
remove(ClusterObject obj)
Removes the named object from the objectStore. |
void |
setBlobType(java.lang.String blobType)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setTableName(java.lang.String tableName)
|
boolean |
start()
Called to start the objectStore. |
protected void |
store(ClusterObject obj,
TempOutputStream tempStream,
byte[] digest,
byte[] oldHash)
Save the object to the jdbc objectStore. |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.server.cluster.AbstractClusterStoreManager |
|---|
getPrimaryIndex, getPrimaryServer, getSecondaryIndex, getSecondaryServer, getTertiaryIndex, getTertiaryServer, ping, updateOwner |
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, accessImpl, classLoaderDestroy, classLoaderInit, create, createStore, destroy, environmentBind, environmentConfigure, environmentStart, environmentStop, getAccessWindowTime, getAdmin, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getObjectCount, getOwningServer, getSaveCount, getSaveFailCount, getSelfIndex, getServerList, getStore, handleAlarm, invalidate, isAlwaysLoad, isAlwaysSave, isPrimary, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setExpireInterval, setMaxIdleTime, startUpdate, 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 JdbcStoreManager()
| 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()
StoreManager
init in class StoreManager
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 updateImpl.
java.lang.Exception
protected void store(ClusterObject obj,
TempOutputStream tempStream,
byte[] digest,
byte[] oldHash)
throws java.lang.Exception
store in class StoreManagerobj - the object to objectStore.tempStream - the stream containing the object's datadigest - the sha-1 hash of the dataoldHash - the previous hash value for the data
java.lang.Exception
public void accessImpl(HashKey objectId)
throws java.lang.Exception
accessImpl in class StoreManageruniqueId - the object id to updateImpl to objectStore.
java.lang.Exception
public void remove(ClusterObject obj)
throws java.lang.Exception
remove in class StoreManagerobj - the object to objectRemove
java.lang.Exceptionpublic java.lang.String toString()
toString in class StoreManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||