Package com.exonum.binding.proxy
Interface CleanAction<ResourceDescriptionT>
- 
- Type Parameters:
 ResourceDescriptionT- type of resource this action cleans (usually, an instance ofClass,String,Enum),
- All Known Implementing Classes:
 ProxyDestructor
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public interface CleanAction<ResourceDescriptionT>A clean action is an operation that is performed to release some resources. The type of resource may be optionally specified. 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclean()A clean operation to perform.static <ResourceDescriptionT>
CleanAction<ResourceDescriptionT>from(java.lang.Runnable action, ResourceDescriptionT resourceType)Creates a clean action with a given type.default java.util.Optional<ResourceDescriptionT>resourceType()Returns the description of the type of resource this action corresponds to. 
 - 
 
- 
- 
Method Detail
- 
clean
void clean()
A clean operation to perform. It is recommended that this operation is idempotent. 
- 
resourceType
default java.util.Optional<ResourceDescriptionT> resourceType()
Returns the description of the type of resource this action corresponds to. 
- 
from
static <ResourceDescriptionT> CleanAction<ResourceDescriptionT> from(java.lang.Runnable action, ResourceDescriptionT resourceType)
Creates a clean action with a given type.- Type Parameters:
 ResourceDescriptionT- a type of the resource description- Parameters:
 action- a clean operationresourceType- a description of the resource (its class, textual description, etc.)
 
 - 
 
 -