All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.anotheria.util.concurrency.IdBasedLockManager Maven / Gradle / Ivy

package net.anotheria.util.concurrency;

import java.io.Serializable;

/**
 * Manager/Container for a set of id based locks. The locks are obtained withing the context of the manager.
 *
 * @param  the type of the id.
 * @author another
 * @version $Id: $Id
 */
public interface IdBasedLockManager extends Serializable {
    /**
     * Gets the lock for the specified id. Does not locks but just returns the lock object.
     *
     * @param id the id to get the lock for.
     * @return the lock object.
     */
    IdBasedLock obtainLock(K id);

    /**
     * 

releaseLock.

* * @param lock a {@link net.anotheria.util.concurrency.IdBasedLock} object. */ void releaseLock(IdBasedLock lock); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy