Class BackendStats.Builder

java.lang.Object
express.mvp.myra.transport.BackendStats.Builder
Enclosing class:
BackendStats

public static final class BackendStats.Builder extends Object
Builder for constructing BackendStats instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • totalSends

      public BackendStats.Builder totalSends(long count)
      Sets the total send count.
      Parameters:
      count - send operations completed
      Returns:
      this builder for chaining
    • totalReceives

      public BackendStats.Builder totalReceives(long count)
      Sets the total receive count.
      Parameters:
      count - receive operations completed
      Returns:
      this builder for chaining
    • totalBytesSent

      public BackendStats.Builder totalBytesSent(long bytes)
      Sets the total bytes sent.
      Parameters:
      bytes - cumulative bytes sent
      Returns:
      this builder for chaining
    • totalBytesReceived

      public BackendStats.Builder totalBytesReceived(long bytes)
      Sets the total bytes received.
      Parameters:
      bytes - cumulative bytes received
      Returns:
      this builder for chaining
    • failedSends

      public BackendStats.Builder failedSends(long count)
      Sets the failed send count.
      Parameters:
      count - failed send operations
      Returns:
      this builder for chaining
    • failedReceives

      public BackendStats.Builder failedReceives(long count)
      Sets the failed receive count.
      Parameters:
      count - failed receive operations
      Returns:
      this builder for chaining
    • batchSubmissions

      public BackendStats.Builder batchSubmissions(long count)
      Sets the batch submission count.
      Parameters:
      count - number of batch submissions
      Returns:
      this builder for chaining
    • avgBatchSize

      public BackendStats.Builder avgBatchSize(double avg)
      Sets the average batch size.
      Parameters:
      avg - average operations per batch
      Returns:
      this builder for chaining
    • totalSyscalls

      public BackendStats.Builder totalSyscalls(long count)
      Sets the total syscall count.
      Parameters:
      count - number of syscalls made
      Returns:
      this builder for chaining
    • build

      public BackendStats build()
      Builds the statistics snapshot.
      Returns:
      a new immutable BackendStats