Interface DistributedLogStore

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
H2LogStore

public interface DistributedLogStore extends AutoCloseable
Interface for distributed log storage.

This interface defines operations for storing and querying logs from distributed workflow execution across multiple nodes.

Author:
devteam@scivics-lab.com
  • Method Details

    • startSession

      long startSession(String workflowName, int nodeCount)
      Starts a new workflow execution session.
      Parameters:
      workflowName - name of the workflow being executed
      nodeCount - number of nodes participating in this session
      Returns:
      session ID for subsequent log entries
    • startSession

      long startSession(String workflowName, String overlayName, String inventoryName, int nodeCount)
      Starts a new workflow execution session with overlay and inventory info.
      Parameters:
      workflowName - name of the workflow being executed
      overlayName - name of the overlay being used (may be null)
      inventoryName - name of the inventory file being used (may be null)
      nodeCount - number of nodes participating in this session
      Returns:
      session ID for subsequent log entries
    • log

      void log(long sessionId, String nodeId, LogLevel level, String message)
      Records a log entry.
      Parameters:
      sessionId - session ID from startSession()
      nodeId - identifier of the node generating this log
      level - log level
      message - log message
    • log

      void log(long sessionId, String nodeId, String vertexName, LogLevel level, String message)
      Records a log entry with vertex context.
      Parameters:
      sessionId - session ID from startSession()
      nodeId - identifier of the node
      vertexName - current vertex name in workflow
      level - log level
      message - log message
    • logAction

      void logAction(long sessionId, String nodeId, String vertexName, String actionName, int exitCode, long durationMs, String output)
      Records an action result.
      Parameters:
      sessionId - session ID
      nodeId - node identifier
      vertexName - vertex name
      actionName - action/method name
      exitCode - command exit code (0 for success)
      durationMs - execution duration in milliseconds
      output - command output or result message
    • markNodeSuccess

      void markNodeSuccess(long sessionId, String nodeId)
      Marks a node as succeeded in this session.
      Parameters:
      sessionId - session ID
      nodeId - node identifier
    • markNodeFailed

      void markNodeFailed(long sessionId, String nodeId, String reason)
      Marks a node as failed in this session.
      Parameters:
      sessionId - session ID
      nodeId - node identifier
      reason - failure reason
    • endSession

      void endSession(long sessionId, SessionStatus status)
      Ends a session with the given status.
      Parameters:
      sessionId - session ID
      status - final status
    • getLogsByNode

      List<LogEntry> getLogsByNode(long sessionId, String nodeId)
      Retrieves all log entries for a specific node in a session.
      Parameters:
      sessionId - session ID
      nodeId - node identifier
      Returns:
      list of log entries
    • getLogsByLevel

      List<LogEntry> getLogsByLevel(long sessionId, LogLevel minLevel)
      Retrieves log entries filtered by level.
      Parameters:
      sessionId - session ID
      minLevel - minimum log level to include
      Returns:
      list of log entries
    • getErrors

      default List<LogEntry> getErrors(long sessionId)
      Retrieves error logs for a session.
      Parameters:
      sessionId - session ID
      Returns:
      list of error log entries
    • getSummary

      SessionSummary getSummary(long sessionId)
      Gets a summary of the session.
      Parameters:
      sessionId - session ID
      Returns:
      session summary
    • getLatestSessionId

      Gets the most recent session ID.
      Returns:
      latest session ID, or -1 if no sessions exist
    • listSessions

      Lists all sessions.
      Parameters:
      limit - maximum number of sessions to return
      Returns:
      list of session summaries