001package com.avaje.ebeaninternal.server.cluster.socket;
002
003/**
004 * The current state of this cluster member.
005 */
006public class SocketClusterStatus {
007
008  private final int currentGroupSize;
009  private final long incoming;
010  private final long outgoing;
011
012  public SocketClusterStatus(int currentGroupSize, long incoming, long txnOutgoing) {
013    this.currentGroupSize = currentGroupSize;
014    this.incoming = incoming;
015    this.outgoing = txnOutgoing;
016  }
017
018  /**
019   * Return the number of members of the cluster currently online.
020   */
021  public int size() {
022    return currentGroupSize;
023  }
024
025  /**
026   * Return the number of Remote transactions received.
027   */
028  public long getIncoming() {
029    return incoming;
030  }
031
032  /**
033   * Return the number of transactions sent to the cluster.
034   */
035  public long getOutgoing() {
036    return outgoing;
037  }
038
039}