Interface AgentStreamByInvoke

All Superinterfaces:
AutoCloseable, Closeable

public interface AgentStreamByInvoke extends Closeable
Stream for accessing data emitted from all invocations of a specific node. The returned object can be closed to immediately stop streaming. Example:

 AgentStreamByInvoke stream = client.streamAll(invoke, "myNode");
 
 // Get current chunks grouped by invoke ID
 Map<UUID, List<String>> chunksByInvoke = stream.get();
 
 // Check resets per invoke
 Map<UUID, Long> resetsByInvoke = stream.numResetsByInvoke();
 
 stream.close();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Map<UUID,List<T>>
    get()
    Gets the current streamed chunks grouped by node invoke ID.
    Gets the number of resets per node invoke ID.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • get

      <T> Map<UUID,List<T>> get()
      Gets the current streamed chunks grouped by node invoke ID.
      Type Parameters:
      T - the type of chunks being streamed
      Returns:
      map from node invoke ID to list of chunks
    • numResetsByInvoke

      Map<UUID,Long> numResetsByInvoke()
      Gets the number of resets per node invoke ID. Resets occur when nodes fail and retry, causing the stream to start over.
      Returns:
      map from node invoke ID to number of resets