Class SubscriptionStatistics


  • public final class SubscriptionStatistics
    extends java.lang.Object
    Used by Lightstreamer to provide to method TableInfo.getSubscriptionStatistics() value objects to report activity statistics for single subscribed items involved in a Table (i.e.: Subscription).
    • Constructor Summary

      Constructors 
      Constructor Description
      SubscriptionStatistics​(long totRealTime, long totLost, long totFiltered)
      Used by Lightstreamer to create a SubscriptionStatistics instance, collecting various activity statistics for a single Item.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getTotFiltered()
      Returns the number of updates that were not sent to the client, but filtered out according to the filtering rules, throughout the life of a subscription.
      long getTotLost()
      Returns the number of updates that had to be sent the client, but weren't, throughout the life of a subscription.
      long getTotRealTime()
      Returns the number of real-time updates sent to the client throughout the life of a subscription.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubscriptionStatistics

        public SubscriptionStatistics​(long totRealTime,
                                      long totLost,
                                      long totFiltered)
        Used by Lightstreamer to create a SubscriptionStatistics instance, collecting various activity statistics for a single Item.
        Parameters:
        totRealTime - the number of real-time updates sent to the client. Events that are part of the initial snapshot are not included.
        totLost - the number of updates that had to be sent the client, but weren't, because of buffer restrictions.
        totFiltered - the number of updates that were not sent to the client, but filtered out according to the filtering rules.
    • Method Detail

      • getTotRealTime

        public long getTotRealTime()
        Returns the number of real-time updates sent to the client throughout the life of a subscription. Events that are part of the initial snapshot are not included.
        Returns:
        The number of updates sent.
      • getTotLost

        public long getTotLost()
        Returns the number of updates that had to be sent the client, but weren't, throughout the life of a subscription. This is only possible in case of buffer restrictions posed for safety purpose.
        This applies to Items subscribed to in RAW mode, or in any mode with unfiltered dispatching specified. This also applies to items subscribed to in COMMAND mode with filtered dispatching, restricted to "ADD" and "DELETE" events only (note that those events can also be filtered through matching). Any lost event is also notified to the client.
        Returns:
        The number of updates lost.
      • getTotFiltered

        public long getTotFiltered()
        Returns the number of updates that were not sent to the client, but filtered out according to the filtering rules, throughout the life of a subscription.
        Events can be filtered only if this is allowed by the item subscription mode; in that case, no information on the current state of the item is lost and the client is not notified. Events lost as specified for getTotLost() are not considered as filtered. Events discarded because of the application of a "selector" are also included in this count, regardless of the subscription mode.
        Returns:
        The number of updates filtered out.