Package de.aristaflow.adept2.util
Class CleanupTask.MutableCloseTask
- java.lang.Object
-
- de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask<Exception>
-
- de.aristaflow.adept2.util.CleanupTask.CloseAndResetTask
-
- de.aristaflow.adept2.util.CleanupTask.MutableCloseTask
-
- All Implemented Interfaces:
CleanupTask<Exception>
- Enclosing interface:
- CleanupTask<EX extends Exception>
public static final class CleanupTask.MutableCloseTask extends CleanupTask.CloseAndResetTask
A simple cleanup task for cleaning up aMutable
. No cleanup will occur if its value isnull
or noAutoCloseable
, theMutable
will be set tonull
afterwards.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.aristaflow.adept2.util.CleanupTask
CleanupTask.AbstractCleanupTask<EX extends Exception>, CleanupTask.AtomicCloseTask, CleanupTask.CloseAndResetTask, CleanupTask.MutableCloseTask
-
-
Field Summary
-
Fields inherited from class de.aristaflow.adept2.util.CleanupTask.CloseAndResetTask
reset, supplier
-
Fields inherited from class de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask
descriptor, logger
-
-
Constructor Summary
Constructors Constructor Description MutableCloseTask(String descriptor, Logger logger, org.apache.commons.lang3.mutable.Mutable<?> mutable)
Creates a newCleanupTask.MutableCloseTask
for the designatedMutable
, the designated descriptor and the designated logger.MutableCloseTask(String descriptor, org.apache.commons.lang3.mutable.Mutable<?> mutable)
Creates a newCleanupTask.MutableCloseTask
for the designatedMutable
and the designated descriptor usingCleanup's default logger
.
-
Method Summary
-
Methods inherited from class de.aristaflow.adept2.util.CleanupTask.CloseAndResetTask
cleanup
-
Methods inherited from class de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask
getDescriptor
-
-
-
-
Constructor Detail
-
MutableCloseTask
public MutableCloseTask(String descriptor, org.apache.commons.lang3.mutable.Mutable<?> mutable)
Creates a newCleanupTask.MutableCloseTask
for the designatedMutable
and the designated descriptor usingCleanup's default logger
.- Parameters:
descriptor
- A string that meaningfully describes this task when used for logging etc. ornull
.mutable
- The mutable which toAutoCloseable.close()
and set tonull
.
-
MutableCloseTask
public MutableCloseTask(String descriptor, Logger logger, org.apache.commons.lang3.mutable.Mutable<?> mutable)
Creates a newCleanupTask.MutableCloseTask
for the designatedMutable
, the designated descriptor and the designated logger.- Parameters:
descriptor
- A string that meaningfully describes this task when used for logging etc. ornull
.logger
- The logger for messages and/or problems, e. g. unexpected exceptions.mutable
- The mutable which toAutoCloseable.close()
and set tonull
.
-
-