Codota Logo
SourceFunction$SourceContext.close
Code IndexAdd Codota to your IDE (free)

How to use
close
method
in
org.apache.flink.streaming.api.functions.source.SourceFunction$SourceContext

Best Java code snippets using org.apache.flink.streaming.api.functions.source.SourceFunction$SourceContext.close (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: apache/flink

  public void close() {
    this.shouldClose = true;
  }
}
origin: dataArtisans/yahoo-streaming-benchmark

/**
 * The main loop
 */
@Override
public void run(SourceContext<T> sourceContext) throws Exception {
 int elements = loadPerTimeslice();
 while (running) {
  long emitStartTime = System.currentTimeMillis();
  for (int i = 0; i < elements; i++) {
   sourceContext.collect(generateElement());
  }
  // Sleep for the rest of timeslice if needed
  long emitTime = System.currentTimeMillis() - emitStartTime;
  if (emitTime < timeSliceLengthMs) {
   Thread.sleep(timeSliceLengthMs - emitTime);
  }
 }
 sourceContext.close();
}
origin: org.apache.flink/flink-streaming-java

  public void close() {
    this.shouldClose = true;
  }
}
origin: org.apache.flink/flink-streaming-java

public void cancel() {
  // important: marking the source as stopped has to happen before the function is stopped.
  // the flag that tracks this status is volatile, so the memory model also guarantees
  // the happens-before relationship
  markCanceledOrStopped();
  userFunction.cancel();
  // the context may not be initialized if the source was never running.
  if (ctx != null) {
    ctx.close();
  }
}
origin: org.apache.flink/flink-streaming-java_2.10

public void cancel() {
  // important: marking the source as stopped has to happen before the function is stopped.
  // the flag that tracks this status is volatile, so the memory model also guarantees
  // the happens-before relationship
  markCanceledOrStopped();
  userFunction.cancel();
  // the context may not be initialized if the source was never running.
  if (ctx != null) {
    ctx.close();
  }
}
origin: org.apache.flink/flink-streaming-java_2.11

public void cancel() {
  // important: marking the source as stopped has to happen before the function is stopped.
  // the flag that tracks this status is volatile, so the memory model also guarantees
  // the happens-before relationship
  markCanceledOrStopped();
  userFunction.cancel();
  // the context may not be initialized if the source was never running.
  if (ctx != null) {
    ctx.close();
  }
}
origin: apache/flink

ctx.close();
if (latencyEmitter != null) {
  latencyEmitter.close();
origin: org.apache.flink/flink-streaming-java_2.11

  public void close() {
    this.shouldClose = true;
  }
}
origin: org.apache.flink/flink-streaming-java_2.10

ctx.close();
if (latencyEmitter != null) {
  latencyEmitter.close();
origin: org.apache.flink/flink-streaming-java_2.11

ctx.close();
if (latencyEmitter != null) {
  latencyEmitter.close();
origin: apache/flink

public void cancel() {
  // important: marking the source as stopped has to happen before the function is stopped.
  // the flag that tracks this status is volatile, so the memory model also guarantees
  // the happens-before relationship
  markCanceledOrStopped();
  userFunction.cancel();
  // the context may not be initialized if the source was never running.
  if (ctx != null) {
    ctx.close();
  }
}
origin: org.apache.flink/flink-streaming-java

ctx.close();
if (latencyEmitter != null) {
  latencyEmitter.close();
origin: org.apache.flink/flink-streaming-java_2.10

  public void close() {
    this.shouldClose = true;
  }
}
org.apache.flink.streaming.api.functions.sourceSourceFunction$SourceContextclose

Javadoc

This method is called by the system to shut down the context.

Popular methods of SourceFunction$SourceContext

  • collect
    Emits one element from the source, without attaching a timestamp. In most cases, this is the default
  • getCheckpointLock
    Returns the checkpoint lock. Please refer to the class-level comment in SourceFunction for details a
  • emitWatermark
    Emits the given Watermark. A Watermark of value t declares that no elements with a timestamp t' late
  • collectWithTimestamp
    Emits one element from the source, and attaches the given timestamp. This method is relevant for pro
  • markAsTemporarilyIdle
    Marks the source to be temporarily idle. This tells the system that this source will temporarily sto

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ImageIO (javax.imageio)
  • JComboBox (javax.swing)
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now