Class MBeanRepository<O>

Type Parameters:
O - the generic type
All Implemented Interfaces:
MBeanService, MonitorCallback, Closeable, AutoCloseable, Runnable
Direct Known Subclasses:
MailMBean, MoverServer.DownloadRepository, StorageRepository, TransferScheduler.DestinationThread

public abstract class MBeanRepository<O> extends MBeanScheduler
The Class MBeanRepository.
  • Constructor Details

    • MBeanRepository

      public MBeanRepository(String group, String name)
      Instantiates a new m bean repository.
      Parameters:
      group - the group
      name - the name
    • MBeanRepository

      public MBeanRepository(String name)
      Instantiates a new m bean repository.
      Parameters:
      name - the name
  • Method Details

    • clear

      public void clear()
      Clear.
    • getKey

      public String getKey(O object)
      Gets the key.
      Parameters:
      object - the object
      Returns:
      the key
    • getStatus

      public String getStatus(O object)
      Gets the status.
      Parameters:
      object - the object
      Returns:
      the status
    • setComparator

      public void setComparator(Comparator<O> comparator)
      Sets the comparator.
      Parameters:
      comparator - the new comparator
    • setMaxAuthorisedSize

      public void setMaxAuthorisedSize(int maxAuthorisedSize)
      Sets the max authorised size.
      Parameters:
      maxAuthorisedSize - the max authorised size
    • getComparator

      public Comparator<O> getComparator()
      Gets the comparator.
      Returns:
      the comparator
    • setWakeup

      public void setWakeup(boolean wakeup)
      Sets the wakeup.
      Parameters:
      wakeup - the new wakeup
    • getWakeup

      public boolean getWakeup()
      Gets the wakeup.
      Returns:
      the wakeup
    • getStatus

      public String getStatus()
      Gets the status.
      Returns:
      the status
    • getList

      public List<O> getList()
      Gets the list.
      Returns:
      the list
    • getSize

      public int getSize()
      Gets the size.
      Returns:
      the size
    • getList

      public List<O> getList(Comparator<O> comparator)
      Gets the list.
      Parameters:
      comparator - the comparator
      Returns:
      the list
    • sort

      public List<O> sort(List<O> list)
      Sorts the list.
      Parameters:
      list - the list
      Returns:
      the list
    • getMBeanInfo

      public MBeanInfo getMBeanInfo()
      Gets the MBean info. Gets the MBean info. Gets the MBean info.
      Specified by:
      getMBeanInfo in interface MBeanService
      Overrides:
      getMBeanInfo in class MBeanScheduler
      Returns:
      the MBean info
    • invoke

      public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException
      Invoke. Invoke. Invoke.
      Specified by:
      invoke in interface MBeanService
      Overrides:
      invoke in class MBeanScheduler
      Parameters:
      operationName - the operation name
      params - the params
      signature - the signature
      Returns:
      the object
      Throws:
      NoSuchMethodException - the no such method exception
      MBeanException - the MBean exception
    • getAttribute

      public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException
      Gets the attribute. Gets the attribute. Gets the attribute.
      Specified by:
      getAttribute in interface MBeanService
      Overrides:
      getAttribute in class MBeanScheduler
      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute
      Throws:
      AttributeNotFoundException - the attribute not found exception
      MBeanException - the MBean exception
    • put

      public void put(O object)
      Puts the object.
      Parameters:
      object - the object
    • removeValue

      public O removeValue(O object)
      Removes the value.
      Parameters:
      object - the object
      Returns:
      the o
    • removeKey

      public O removeKey(String key)
      Removes the key.
      Parameters:
      key - the key
      Returns:
      the o
    • containsValue

      public boolean containsValue(O object)
      Contains value.
      Parameters:
      object - the object
      Returns:
      true, if successful
    • containsKey

      public boolean containsKey(String key)
      Contains key.
      Parameters:
      key - the key
      Returns:
      true, if successful
    • getValue

      public O getValue(String key)
      Gets the value.
      Parameters:
      key - the key
      Returns:
      the value