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

net.sf.javagimmicks.concurrent.locks.MultiLockProvider Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
package net.sf.javagimmicks.concurrent.locks;

/**
 * This is the entry point to the {@link MultiLock} API - it creates and manages
 * {@link MultiReadWriteLock} instances and the internal resource identifiers
 * used to handle for acquisition and release management.
 * 
 * @param 
 *           The type of the internally used resource identifiers
 */
public interface MultiLockProvider
{
   /**
    * Creates a new {@link MultiReadWriteLock} that is associated with the given
    * resource identifiers.
    * 
    * @param resourceIds
    *           the resource identifiers to associate the new
    *           {@link MultiReadWriteLock} with
    * @return the new {@link MultiReadWriteLock} instance
    */
   MultiReadWriteLock newLock(Iterable resourceIds);

   /**
    * Creates a new {@link MultiReadWriteLock} that is associated with the given
    * resource identifiers.
    * 
    * @param resourceIds
    *           the resource identifiers to associate the new
    *           {@link MultiReadWriteLock} with
    * @return the new {@link MultiReadWriteLock} instance
    */
   MultiReadWriteLock newLock(K... resourceIds);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy