Package org.agrona
Interface ManagedResource
public interface ManagedResource
Implementations of this interface can a resource that need to have external state tracked for deletion.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Delete any resources held.long
Get the time of the last state change.void
timeOfLastStateChange
(long time) Set the time of the last state change.
-
Method Details
-
timeOfLastStateChange
void timeOfLastStateChange(long time) Set the time of the last state change.- Parameters:
time
- of the last state change.
-
timeOfLastStateChange
long timeOfLastStateChange()Get the time of the last state change.- Returns:
- the time of the last state change.
-
delete
void delete()Delete any resources held. This method should be idempotent.
-