All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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();

  /** Returns config of current function */
  Map getConfig();

  /** Returns 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 - 2024 Weber Informatics LLC | Privacy Policy