public class StateUtil extends Object
|Modifier and Type||Method and Description|
Iterates through the passed state handles and calls discardState() on each handle that is not null.
Discards the given state future by first trying to cancel it.
Returns the size of a state object
public static long getStateSize(StateObject handle)
handle- The handle to the retrieved state
public static void bestEffortDiscardAllStateObjects(Iterable<? extends StateObject> handlesToDiscard) throws Exception
handlesToDiscard- State handles to discard. Passed iterable is allowed to deliver null values.
Exception- exception that is a collection of all suppressed exceptions that were caught during iteration
public static void discardStateFuture(RunnableFuture<? extends StateObject> stateFuture) throws Exception
stateFuture- to be discarded
Exception- if the discard operation failed
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.