Class PendingUsageActivity

java.lang.Object
org.odpi.openmetadata.adapters.connectors.pepys.PendingUsageActivity

public class PendingUsageActivity extends Object
PendingUsageActivity accumulates the activity observed for a single element since its UsageActivity classification was last written. There is one count for each kind of activity, and the counts are added to the classification's values on the next refresh.
  • Constructor Details

    • PendingUsageActivity

      public PendingUsageActivity()
      Default constructor
  • Method Details

    • increment

      public void increment(ObservedActivity.UsageCount usageCount)
      Increment the count for an activity.
      Parameters:
      usageCount - count to increment
    • add

      public void add(PendingUsageActivity other)
      Add the counts from another set of pending activity. This is used to put back the counts that could not be written so that they are tried again on the next refresh.
      Parameters:
      other - counts to add
    • getCount

      public long getCount(ObservedActivity.UsageCount usageCount)
      Return the number of activities of a particular kind that have been observed.
      Parameters:
      usageCount - kind of activity
      Returns:
      long
    • getTotal

      public long getTotal()
      Return the total number of activities observed.
      Returns:
      long
    • toString

      public String toString()
      JSON-style toString
      Overrides:
      toString in class Object
      Returns:
      string of property names and values