org.apache.edgent.function.Functions.discard()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中org.apache.edgent.function.Functions.discard()方法的一些代码示例,展示了Functions.discard()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.discard()方法的具体详情如下:
包路径:org.apache.edgent.function.Functions
类名称:Functions
方法名:discard

Functions.discard介绍

[英]A Consumer that discards all items passed to it.
[中]

代码示例

代码示例来源:origin: apache/incubator-edgent

/**
 * Create with the destination set to {@link Functions#discard()}.
 */
public SettableForwarder() {
  this.destination = Functions.discard();
}

代码示例来源:origin: org.apache.edgent/edgent-runtime-etiao

/**
 * Create with the destination set to {@link Functions#discard()}.
 */
public SettableForwarder() {
  this.destination = Functions.discard();
}

代码示例来源:origin: apache/incubator-edgent

/**
 * Disconnects the specified port by connecting to a no-op {@code Consumer} implementation.
 * 
 * @param port the port index
 */
public void disconnect(int port) {
  outputs.set(port, Functions.discard());
}

代码示例来源:origin: org.apache.edgent/edgent-runtime-etiao

/**
 * Disconnects the specified port by connecting to a no-op {@code Consumer} implementation.
 * 
 * @param port the port index
 */
public void disconnect(int port) {
  outputs.set(port, Functions.discard());
}

代码示例来源:origin: org.apache.edgent/edgent-runtime-etiao

/**
 * Adds a new output.  By default, the output is connected to a Consumer 
 * that discards all items passed to it.
 * 
 * @return the index of the new output
 */
public int addOutput() {
  int index = outputs.size();
  outputs.add(Functions.discard());
  outputContext.add(DEFAULT_OUTPUT_CONTEXT);
  return index;
}

代码示例来源:origin: apache/incubator-edgent

/**
 * Adds a new output.  By default, the output is connected to a Consumer 
 * that discards all items passed to it.
 * 
 * @return the index of the new output
 */
public int addOutput() {
  int index = outputs.size();
  outputs.add(Functions.discard());
  outputContext.add(DEFAULT_OUTPUT_CONTEXT);
  return index;
}

代码示例来源:origin: org.apache.edgent/edgent-api-oplet

/**
 * Create a  {@code Sink} that discards all tuples.
 * The sink function can be changed using
 * {@link #setSinker(Consumer)}.
 */
public Sink() {
  setSinker(Functions.discard());
}

代码示例来源:origin: apache/incubator-edgent

/**
 * Create a  {@code Sink} that discards all tuples.
 * The sink function can be changed using
 * {@link #setSinker(Consumer)}.
 */
public Sink() {
  setSinker(Functions.discard());
}

代码示例来源:origin: apache/incubator-edgent

private TSink<JsonObject> handleEvents(TStream<JsonObject> stream) {
  
  if (echoCmds == null)
    echoCmds = PlumbingStreams.isolate(stream, true);
  else
    echoCmds = PlumbingStreams.isolate(stream.union(echoCmds), true);
  
  return stream.sink(discard());
}

相关文章