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.
  • Method Details

    • 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.
    • getSubscribedItemListProtected

      java.util.List<java.lang.String> getSubscribedItemListProtected​(java.lang.Integer max)
      Parameters:
      max - The maximum number of elements to be returned, or null if no limit is requested.
      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.
      A maximum number of elements to be returned can be set, to protect the client or to get a sample. When the limit is set, the criteria for the determination of the returned elements are left unspecified.
      See Also:
      getSubscribedItems()
    • 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.
      The property is subject to the <disable_long_list_properties> configuration flag. If leveraged, the returned list will just contain a reminder text.
      See Also:
      getSubscribedItemListProtected(java.lang.Integer), 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.
    • getSubscribedButFailedItemListProtected

      java.util.List<java.lang.String> getSubscribedButFailedItemListProtected​(java.lang.Integer max)
      Parameters:
      max - The maximum number of elements to be returned, or null if no limit is requested.
      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.
      A maximum number of elements to be returned can be set, to protect the client or to get a sample. When the limit is set, the criteria for the determination of the returned elements are left unspecified.
    • 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.
      The property is subject to the <disable_long_list_properties> configuration flag. If leveraged, the returned list will just contain a reminder text.
      See Also:
      getSubscribedButFailedItemListProtected(java.lang.Integer)
    • 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()
      Edition Note:
      MPN is an optional feature, available depending on Edition and License Type. To know what features are enabled by your license, please check out the com.lightstreamer.Edition bean.
    • 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 optional "DATA" pool specifically assigned to this Data Adapter. If configured, 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 configured, these requests are managed by either the optional 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().
    • getIsProxy

      java.lang.Boolean getIsProxy()
      Returns:
      true if this Data Adapter is configured to be a Proxy Data Adapter (the ready-made Data Adapter supplied by Lightstreamer to interface with a Remote Data Adapter through the ARI protocol).