Class FederationConsumerEntry


  • public class FederationConsumerEntry
    extends Object
    Am entry type class used to hold a FederationConsumerInternal and any other state data needed by the manager that is creating them based on the policy configuration for the federation instance. The entry can be extended by federation implementation to hold additional state data for the federation consumer and the managing of its lifetime. This entry type provides a reference counter that can be used to register demand on a federation resource such that it is not torn down until all demand has been removed from the local resource.
    • Constructor Detail

      • FederationConsumerEntry

        public FederationConsumerEntry​(FederationConsumerInternal consumer)
        Creates a new consumer entry with a single reference
        Parameters:
        consumer - The federation consumer that will be carried in this entry.
    • Method Detail

      • addDemand

        public void addDemand()
        Add additional demand on the resource associated with this entries consumer.
      • reduceDemand

        public boolean reduceDemand()
        Reduce the known demand on the resource this entries consumer is associated with and returns true when demand reaches zero which indicates the consumer should be closed and the entry cleaned up.
        Returns:
        true if demand has fallen to zero on the resource associated with the consumer.