Package com.palantir.util
Class SafeShutdownRunner
- java.lang.Object
-
- com.palantir.util.SafeShutdownRunner
-
- All Implemented Interfaces:
AutoCloseable
public final class SafeShutdownRunner extends Object implements AutoCloseable
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static SafeShutdownRunner
createWithCachedThreadpool(java.time.Duration timeoutDuration)
void
shutdownSafely(Runnable shutdownCallback)
-
-
-
Method Detail
-
createWithCachedThreadpool
public static SafeShutdownRunner createWithCachedThreadpool(java.time.Duration timeoutDuration)
-
shutdownSafely
public void shutdownSafely(Runnable shutdownCallback)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-