io.ray.streaming.api.context.RuntimeContext Maven / Gradle / Ivy
package io.ray.streaming.api.context;
import io.ray.streaming.state.backend.KeyStateBackend;
import io.ray.streaming.state.keystate.desc.ListStateDescriptor;
import io.ray.streaming.state.keystate.desc.MapStateDescriptor;
import io.ray.streaming.state.keystate.desc.ValueStateDescriptor;
import io.ray.streaming.state.keystate.state.ListState;
import io.ray.streaming.state.keystate.state.MapState;
import io.ray.streaming.state.keystate.state.ValueState;
import java.util.Map;
/**
* Encapsulate the runtime information of a streaming task.
*/
public interface RuntimeContext {
int getTaskId();
int getTaskIndex();
int getParallelism();
/**
* @return config of current function
*/
Map getConfig();
/**
* @return config of the job
*/
Map getJobConfig();
Long getCheckpointId();
void setCheckpointId(long checkpointId);
void setCurrentKey(Object key);
KeyStateBackend getKeyStateBackend();
void setKeyStateBackend(KeyStateBackend keyStateBackend);
ValueState getValueState(ValueStateDescriptor stateDescriptor);
ListState getListState(ListStateDescriptor stateDescriptor);
MapState getMapState(MapStateDescriptor stateDescriptor);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy