public class MemCheckpointStreamFactory extends Object implements CheckpointStreamFactory
CheckpointStreamFactory
that produces streams that write to in-memory byte arrays.Modifier and Type | Class and Description |
---|---|
static class |
MemCheckpointStreamFactory.MemoryCheckpointOutputStream
A
CheckpointStateOutputStream that writes into a byte array. |
CheckpointStreamFactory.CheckpointStateOutputStream
Constructor and Description |
---|
MemCheckpointStreamFactory(int maxStateSize)
Creates a new in-memory stream factory that accepts states whose serialized forms are up to
the given number of bytes.
|
Modifier and Type | Method and Description |
---|---|
CheckpointStreamFactory.CheckpointStateOutputStream |
createCheckpointStateOutputStream(CheckpointedStateScope scope)
Creates an new
CheckpointStreamFactory.CheckpointStateOutputStream . |
String |
toString() |
public MemCheckpointStreamFactory(int maxStateSize)
maxStateSize
- The maximal size of the serialized statepublic CheckpointStreamFactory.CheckpointStateOutputStream createCheckpointStateOutputStream(CheckpointedStateScope scope) throws IOException
CheckpointStreamFactory
CheckpointStreamFactory.CheckpointStateOutputStream
. When the stream is closed, it returns a
state handle that can retrieve the state back.createCheckpointStateOutputStream
in interface CheckpointStreamFactory
scope
- The state's scope, whether it is exclusive or shared.IOException
- Exceptions may occur while creating the stream and should be forwarded.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.