Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.concurrency.locking
Interface IEntityLockStore

All Known Implementing Classes:
  MemoryEntityLockStore, RDBMEntityLockStore

    public interface IEntityLockStore

Interface for finding and maintaining `IEntityLocks`.

Version:
  $Revision: 1.4 $
Author:
  Dan Ellentuck

Method Summary
`void` | `add(IEntityLock lock)` Adds this IEntityLock to the store.
`void` | `delete(IEntityLock lock)` Deletes this IEntityLock from the store.
`void` | `deleteAll()` Delete all IEntityLocks from the store.
`void` | `deleteExpired(java.util.Date expiration)` Deletes the 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)` Returns an IEntityLock[] based on the params, any or all of which may be null.
`IEntityLock[]` | `findUnexpired(java.util.Date expiration, java.lang.Class entityType, java.lang.String entityKey, java.lang.Integer lockType, java.lang.String lockOwner)` Returns an IEntityLock[] containing unexpired locks, based on the params, any or all of which may be null EXCEPT FOR `expiration`.
`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.

Method Detail

### add

    void add(IEntityLock lock)
             throws LockingException

  Adds this IEntityLock to the store.

  Parameters:
    `lock` - org.jasig.portal.concurrency.locking.IEntityLock
  Throws:
    `LockingException`

### delete

    void delete(IEntityLock lock)
                throws LockingException

  Deletes this IEntityLock from the store.

  Parameters:
    `lock` - org.jasig.portal.concurrency.locking.IEntityLock
  Throws:
    `LockingException`

### deleteAll

    void deleteAll()
                   throws LockingException

  Delete all IEntityLocks from the store.

  Throws:
    `LockingException`

### deleteExpired

    void deleteExpired(java.util.Date expiration)
                       throws LockingException

  Deletes the expired IEntityLocks from the underlying store.

  Parameters:
    `expiration` - java.util.Date
  Throws:
    `LockingException`

### find

    IEntityLock[] find(java.lang.Class entityType,
                       java.lang.String entityKey,
                       java.lang.Integer lockType,
                       java.util.Date expiration,
                       java.lang.String lockOwner)
                       throws LockingException

  Returns an IEntityLock[] based on the params, any or all of which may be null. A null param means any value, so `find(myType,myKey,null,null,null)` will return all `IEntityLocks` for myType and myKey.

  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

    IEntityLock[] findUnexpired(java.util.Date expiration,
                                java.lang.Class entityType,
                                java.lang.String entityKey,
                                java.lang.Integer lockType,
                                java.lang.String lockOwner)
                                throws LockingException

  Returns an IEntityLock[] containing unexpired locks, based on the params, any or all of which may be null EXCEPT FOR `expiration`. A null param means any value, so `find(expir,myType,myKey,null,null)` will return all `IEntityLocks` for myType and myKey unexpired as of `expiration`.

  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.

### update

    void update(IEntityLock lock,
                java.util.Date newExpiration)
                throws LockingException

  Updates the lock's `expiration` in the underlying store.

  Parameters:
    `lock` - org.jasig.portal.concurrency.locking.IEntityLock
    `newExpiration` - java.util.Date
  Throws:
    `LockingException`

### update

    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.

  Parameters:
    `lock` - org.jasig.portal.concurrency.locking.IEntityLock
    `newExpiration` - java.util.Date
    `newLockType` - Integer
  Throws:
    `LockingException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD