uPortal 2.4.1
API Documentation

org.jasig.portal.concurrency.locking
Class RDBMEntityLockStore

java.lang.Object
  extended byorg.jasig.portal.concurrency.locking.RDBMEntityLockStore
All Implemented Interfaces:
IEntityLockStore

public class RDBMEntityLockStore
extends java.lang.Object
implements IEntityLockStore

RDBMS-based store for IEntityLocks.

Version:
$Revision: 1.12.2.1 $
Author:
Dan Ellentuck

Constructor Summary
RDBMEntityLockStore()
          RDBMEntityGroupStore constructor.
 
Method Summary
 void add(IEntityLock lock)
          Adds the lock to the underlying store.
 void delete(IEntityLock lock)
          If this IEntityLock exists, delete it.
 void deleteAll()
          Delete all IEntityLocks from the underlying store.
 void deleteExpired(java.util.Date expiration)
          Delete all expired IEntityLocks from the underlying store.
 void deleteExpired(java.util.Date expiration, java.lang.Class entityType, java.lang.String entityKey)
          Delete IEntityLocks from the underlying store that have expired as of expiration.
 void deleteExpired(IEntityLock lock)
          Delete all expired IEntityLocks from the underlying store.
 IEntityLock[] find(java.lang.Class entityType, java.lang.String entityKey, java.lang.Integer lockType, java.util.Date expiration, java.lang.String lockOwner)
          Retrieve IEntityLocks from the underlying store.
 IEntityLock[] findUnexpired(java.util.Date expiration, java.lang.Class entityType, java.lang.String entityKey, java.lang.Integer lockType, java.lang.String lockOwner)
          Retrieve IEntityLocks from the underlying store.
static IEntityLockStore singleton()
           
 void update(IEntityLock lock, java.util.Date newExpiration)
          Updates the lock's expiration in the underlying store.
 void update(IEntityLock lock, java.util.Date newExpiration, java.lang.Integer newLockType)
          Updates the lock's expiration and lockType in the underlying store.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBMEntityLockStore

public RDBMEntityLockStore()
                    throws LockingException
RDBMEntityGroupStore constructor.

Method Detail

add

public void add(IEntityLock lock)
         throws LockingException
Adds the lock to the underlying store.

Specified by:
add in interface IEntityLockStore
Parameters:
lock -
Throws:
LockingException

delete

public void delete(IEntityLock lock)
            throws LockingException
If this IEntityLock exists, delete it.

Specified by:
delete in interface IEntityLockStore
Parameters:
lock -
Throws:
LockingException

deleteAll

public void deleteAll()
               throws LockingException
Delete all IEntityLocks from the underlying store.

Specified by:
deleteAll in interface IEntityLockStore
Throws:
LockingException

deleteExpired

public void deleteExpired(java.util.Date expiration)
                   throws LockingException
Delete all expired IEntityLocks from the underlying store.

Specified by:
deleteExpired in interface IEntityLockStore
Parameters:
expiration -
Throws:
LockingException

deleteExpired

public void deleteExpired(java.util.Date expiration,
                          java.lang.Class entityType,
                          java.lang.String entityKey)
                   throws LockingException
Delete IEntityLocks from the underlying store that have expired as of expiration. Params entityType and entityKey are optional.

Parameters:
expiration - java.util.Date
entityType - Class
entityKey - String
Throws:
LockingException

deleteExpired

public void deleteExpired(IEntityLock lock)
                   throws LockingException
Delete all expired IEntityLocks from the underlying store.

Parameters:
lock - IEntityLock
Throws:
LockingException

find

public IEntityLock[] find(java.lang.Class entityType,
                          java.lang.String entityKey,
                          java.lang.Integer lockType,
                          java.util.Date expiration,
                          java.lang.String lockOwner)
                   throws LockingException
Retrieve IEntityLocks from the underlying store. Any or all of the parameters may be null.

Specified by:
find in interface IEntityLockStore
Parameters:
entityType - Class
entityKey - String
lockType - Integer - so we can accept a null value.
expiration - Date
lockOwner - String
Returns:
org.jasig.portal.groups.IEntityLock[]
Throws:
LockingException - - wraps an Exception specific to the store.

findUnexpired

public IEntityLock[] findUnexpired(java.util.Date expiration,
                                   java.lang.Class entityType,
                                   java.lang.String entityKey,
                                   java.lang.Integer lockType,
                                   java.lang.String lockOwner)
                            throws LockingException
Retrieve IEntityLocks from the underlying store. Expiration must not be null.

Specified by:
findUnexpired in interface IEntityLockStore
Parameters:
expiration - Date
entityType - Class
entityKey - String
lockType - Integer - so we can accept a null value.
lockOwner - String
Throws:
LockingException - - wraps an Exception specific to the store.

singleton

public static IEntityLockStore singleton()
                                  throws LockingException
Returns:
org.jasig.portal.concurrency.locking.RDBMEntityLockStore
Throws:
LockingException

update

public void update(IEntityLock lock,
                   java.util.Date newExpiration)
            throws LockingException
Description copied from interface: IEntityLockStore
Updates the lock's expiration in the underlying store.

Specified by:
update in interface IEntityLockStore
Parameters:
lock - org.jasig.portal.groups.IEntityLock
newExpiration - java.util.Date
Throws:
LockingException

update

public void update(IEntityLock lock,
                   java.util.Date newExpiration,
                   java.lang.Integer newLockType)
            throws LockingException
Updates the lock's expiration and lockType in the underlying store. Param lockType may be null.

Specified by:
update in interface IEntityLockStore
Parameters:
lock -
newExpiration - java.util.Date
newLockType - Integer
Throws:
LockingException

uPortal 2.4.1
API Documentation