commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Zeigermann (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (TRANSACTION-20) Create a new type of lock manager
Date Sat, 18 Aug 2007 21:49:30 GMT

     [ https://issues.apache.org/jira/browse/TRANSACTION-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Zeigermann resolved TRANSACTION-20.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

Implemented as described.

> Create a new type of lock manager
> ---------------------------------
>
>                 Key: TRANSACTION-20
>                 URL: https://issues.apache.org/jira/browse/TRANSACTION-20
>             Project: Commons Transaction
>          Issue Type: New Feature
>    Affects Versions: 2.0
>            Reporter: Oliver Zeigermann
>            Assignee: Oliver Zeigermann
>             Fix For: 2.0
>
>
> For the new implementations we need a new type of lock manager. We need something general
that can be used for the file manager, the tx maps, and optionally can even be used in a general
programming environment.
> This is my proposal. It is meant to be used by one or more transactional resource managers:
> public interface LockManager<K> {
>     public void startWork(long timeout, TimeUnit unit);
>     public void endWork();
>     public void lock(K key, boolean exclusive) throws LockException;
> }
> Where "startWork" starts a block of work for which a certain set of locks is required
and "endWork" ends it. Only in between these call one can use the "lock" method to lock resources
denoted by the given key. 
> The timeout is meant for the whole block of work and thus does not have to be passed
with every lock request.
> At the end of the working block all locks are released. 
> The "lock" method throws an exception in case of timeout, interruption or deadlock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message