|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.ticket.registry.support.JdbcLockingStrategy
JpaLockingStrategy as of 3.4.11.
@Deprecated public class JdbcLockingStrategy
Locking strategy that uses database storage for lock state that has the following properties:
This class requires a backing database table to exist based on the following template:
CREATE TABLE LOCKS ( APPLICATION_ID VARCHAR(50) NOT NULL, UNIQUE_ID VARCHAR(50) NULL, EXPIRATION_DATE TIMESTAMP NULL ); ALTER TABLE LOCKS ADD CONSTRAINT LOCKS_PK PRIMARY KEY (APPLICATION_ID);
Note that table and column names can be controlled through instance properties, but the create table script above is consistent with defaults.
JpaLockingStrategy| Nested Class Summary | |
|---|---|
static class |
JdbcLockingStrategy.DatabasePlatform
Deprecated. Supported database platforms provides support for platform-specific behavior such as locking semantics. |
| Field Summary | |
|---|---|
static int |
DEFAULT_LOCK_TIMEOUT
Deprecated. Default lock timeout is 1 hour |
| Constructor Summary | |
|---|---|
JdbcLockingStrategy()
Deprecated. |
|
| Method Summary | |
|---|---|
boolean |
acquire()
Deprecated. Attempt to acquire the lock. |
void |
afterPropertiesSet()
Deprecated. |
void |
release()
Deprecated. Release the lock if held. |
void |
setApplicationId(String id)
Deprecated. |
void |
setApplicationIdColumnName(String name)
Deprecated. |
void |
setDataSource(DataSource dataSource)
Deprecated. |
void |
setExpirationDateColumnName(String name)
Deprecated. |
void |
setLockTimeout(int seconds)
Deprecated. |
void |
setPlatform(JdbcLockingStrategy.DatabasePlatform platform)
Deprecated. |
void |
setTableName(String name)
Deprecated. |
void |
setUniqueId(String id)
Deprecated. |
void |
setUniqueIdColumnName(String name)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_LOCK_TIMEOUT
| Constructor Detail |
|---|
public JdbcLockingStrategy()
| Method Detail |
|---|
public void setUniqueId(String id)
id - Identifier used to identify this instance in a row of the
lock table. Must be unique across all clients vying for
locks for a given application ID.public void setApplicationId(String id)
id - Application identifier that identifies a row in the lock
table for which multiple clients vie to hold the lock.
This must be the same for all clients contending for a
particular lock.public void setLockTimeout(int seconds)
seconds - Maximum amount of time in seconds lock may be held.public void setTableName(String name)
name - Name of database table holding locks.public void setApplicationIdColumnName(String name)
name - Name of database column that stores application ID.public void setUniqueIdColumnName(String name)
name - Name of database column that stores unique ID.public void setExpirationDateColumnName(String name)
name - Name of database column that stores lock expiration date.public void setDataSource(DataSource dataSource)
dataSource - JDBC data source.public void setPlatform(JdbcLockingStrategy.DatabasePlatform platform)
platform - Database platform that indicates when special syntax
is needed for database operations.public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean@Transactional public boolean acquire()
LockingStrategy
acquire in interface LockingStrategyLockingStrategy.acquire()@Transactional public void release()
LockingStrategy
release in interface LockingStrategyLockingStrategy.release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||