![JAR search and dependency download from the Maven repository](/logo.png)
com.torodb.util.mgl.HierarchicalMGLock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multiple-granularity-locking Show documentation
Show all versions of multiple-granularity-locking Show documentation
Locking code used within ToroDB. Supports multiple-level granularity, for different types of locks.
package com.torodb.util.mgl;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
/**
*
* @param
* @param The class used to identify childs of this class
*/
@ThreadSafe
public interface HierarchicalMGLock extends MultipleGranularityLock {
/**
*
* @return the parent of this node or null if this is the root
*/
@Nullable
public HMGL getParent() throws UnsupportedOperationException;
/**
*
* @param id
* @return the created child
* @throws IllegalArgumentException if there is already a child with the given id
*/
@Nonnull
public HMGL createChild(ChildId id) throws IllegalArgumentException;
/**
*
* @param id
* @return if there was a child with the given id
*/
public boolean removeChild(ChildId id);
@Nonnull
public HMGL getOrCreateChild(ChildId id);
@Nullable
public HMGL getChild(ChildId id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy