Package io.github.erdos.stencil.impl
Class LifecycleLock
- java.lang.Object
-
- io.github.erdos.stencil.impl.LifecycleLock
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public final class LifecycleLock extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description LifecycleLock(java.lang.Runnable cleanup)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static <T> T
execute(java.util.List<LifecycleLock> locks, java.util.concurrent.Callable<T> supplier)
-
-
-
Method Detail
-
execute
public static <T> T execute(java.util.List<LifecycleLock> locks, java.util.concurrent.Callable<T> supplier) throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-