Interface DataAdapterMBean


  • public interface DataAdapterMBean
    Multiple DataAdapterMBean instances exist in the system, where each one is related to one Data Adapter instance. Every Data Adapter instance is bound to one DataAdapterMBean instances. Note that each Adapter Set may contain multiple Data Adapter instances. Each DataAdapterMBean instance is created at startup by Lightstreamer Server and lasts until the shutdown of the Server. Remote JMX clients should not deregister DataAdapterMBean instances.

    DataAdapterMBean name pattern:
    "com.lightstreamer:type=DataAdapter,AdapterSetName=<AdapterSetName>,DataAdapterName=<DataAdapterName>"

    Special pattern for the Data Adapter carrying the state of the MPN Module (when enabled):
    "com.lightstreamer:type=DataAdapter,SharedDataAdapterName=<DataAdapterName>"
    The actual name corresponds to the <internal_data_adapter> configuration setting in the <mpn> block.

    To ensure compatibility with old JMX clients as long as old adapters deployment style is used, Data Adapters whose local name is not configured (or whose local name is "DEFAULT") can also be addressed through the following pattern:
    "com.lightstreamer:type=DataAdapter,name=<AdapterSetName>"
    • Method Detail

      • getSubscribedItems

        java.lang.Long getSubscribedItems()
        Returns:
        The number of currently subscribed Items coming from this Data Adapter. The count includes subscriptions needed to accomplish the Push Notification service.
      • getSubscribedItemList

        java.util.List<java.lang.String> getSubscribedItemList()
        Returns:
        The list of currently subscribed Items coming from this Data Adapter. Expressed as an ArrayList of Strings, where each String contains the itemName of the Item.
        See Also:
        getSubscribedItems()
      • getSubscribedButFailedItems

        java.lang.Long getSubscribedButFailedItems()
        Returns:
        The number of currently subscribed Items coming from this Data Adapter that can not send events because their subscription attempt got an error from the Adapter.
      • getSubscribedButFailedItemList

        java.util.List<java.lang.String> getSubscribedButFailedItemList()
        Returns:
        The list of currently subscribed Items coming from this Data Adapter that can not send events because their subscription attempt got an error from the Adapter. Expressed as an ArrayList of Strings, where each String contains the itemName of the Item.
      • getSessionListForItem

        java.util.List<java.lang.String> getSessionListForItem​(java.lang.String itemName)
        Parameters:
        itemName - an Item name.
        Returns:
        The list of current client Sessions delivering itemName item, where the specified item comes from this Data Adapter. Expressed as an ArrayList of Strings, where each String contains the sessionID of the Session.
      • getMPNDeviceListForItem

        java.util.List<java.lang.String> getMPNDeviceListForItem​(java.lang.String itemName)
        Parameters:
        itemName - an Item name.
        Returns:
        The list of MPN Devices currently handled by the Push Notification service that require a subscription to itemName item, where the specified item comes from this Data Adapter. Expressed as an ArrayList of Strings, where each String contains a unique identifier for the MPN Device.
        See Also:
        PushNotificationsMBean.getCurrentMPNDevices()
        Unavailability Note:
        MPN is currently not available.
      • clearSnapshot

        java.lang.Boolean clearSnapshot​(java.lang.String itemName)
        Cause the current Snapshot of an Item that comes from this Data Adapter to suddenly become empty, as though the "clearSnapshot" method were invoked by the Data Adapter on the ItemEventListener. See the documentation of the latter method for details on the meaning of this request.
        The request may be useful particularly for items in DISTINCT mode, to erase the recent update history kept by the Kernel, if obsolete.
        On the other hand, for items in MERGE or COMMAND mode, the request affects the current item state kept by the Kernel, while providing no notification of that to the Data Adapter; in fact, the subsequent updates issued by the Data Adapter will still refer to the previous nonempty state. In COMMAND mode, this may even cause inconsistencies to be fixed heuristically by the Kernel, for instance an "UPDATE" event issued for a non-active key, that will be replaced with an "ADD". So, the request should be used with care in these cases.
        Parameters:
        itemName - an Item name.
        Returns:
        true if the specified item was currently subscribed to through this Data Adapter, hence the request has been accomplished; false otherwise.
      • getCumulInboundEvents

        java.lang.Long getCumulInboundEvents()
        Returns:
        The total (cumulative) number of inbound events flowing from this Data Adapter into LS Kernel.
        See Also:
        getSubscribedItems()
      • getInboundEventFrequency

        java.lang.Double getInboundEventFrequency()
        Returns:
        The frequency of inbound events flowing from this Data Adapter into LS Kernel in the last sampling period. It is expressed as events per second; the value has a three decimal precision.
        See Also:
        getSubscribedItems()
      • getMaxInboundEventFrequency

        java.lang.Double getMaxInboundEventFrequency()
        Returns:
        The maximum frequency of inbound events flowing from this Data Adapter into LS Kernel reached in the life of the Server. It is expressed as events per second; the value has a three decimal precision.
        See Also:
        getSubscribedItems()
      • getLocalPoolQueue

        java.lang.Integer getLocalPoolQueue()
        Returns:
        The length of the queue of the tasks waiting to be processed by the "DATA" pool specifically assigned to this Data Adapter. If assigned, this pool manages subscription and authorization requests for items served by this Data Adapter; only for subscription requests originated by the Push Notification service, a dedicated global pool may be configured to override this one. If a specific pool is not assigned, these requests are managed by either the Adapter Set specific pool or the SERVER pool; in this case, -1 is returned.
      • getCurrentItemSubscriptions

        java.lang.Integer getCurrentItemSubscriptions()
        Returns:
        The current number of subscriptions to items that come from this Data Adapter currently active for some client. Different subscriptions to the same Item performed by different clients (or even the same client) are reported multiple times in the count. The count includes subscriptions needed to accomplish the Push Notification service.
      • getMaxItemSubscriptions

        java.lang.Integer getMaxItemSubscriptions()
        Returns:
        The maximum number of concurrently active subscriptions to items that come from this Data Adapter reached in the life of the Server. See getCurrentItemSubscriptions().
      • getNewItemSubscriptions

        java.lang.Integer getNewItemSubscriptions()
        Returns:
        The number of subscriptions to items that come from this Data Adapter performed by the clients in the last sampling period. See getCurrentItemSubscriptions().
      • getNewItemUnsubscriptions

        java.lang.Integer getNewItemUnsubscriptions()
        Returns:
        The number of unsubscriptions from items that come from this Data Adapter performed by some client in the last sampling period; this includes unsubscriptions due to session closure. See getCurrentItemSubscriptions().