public class StateUtil extends Object
StateObject related code.| Modifier and Type | Method and Description |
|---|---|
static void |
bestEffortDiscardAllStateObjects(Iterable<? extends StateObject> handlesToDiscard)
Iterates through the passed state handles and calls discardState() on each handle that is not null.
|
static void |
discardStateFuture(RunnableFuture<? extends StateObject> stateFuture)
Discards the given state future by first trying to cancel it.
|
static long |
getStateSize(StateObject handle)
Returns the size of a state object
|
public static long getStateSize(StateObject handle)
handle - The handle to the retrieved statepublic 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 iterationpublic static void discardStateFuture(RunnableFuture<? extends StateObject> stateFuture) throws Exception
stateFuture - to be discardedException - if the discard operation failedCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.