ISCacheConsistencyManager
Date: 2014-11-12

org.gcube.informationsystem.cache

## Class ISCacheConsistencyManager

- java.lang.Object
- - org.gcube.informationsystem.cache.ISCacheConsistencyManager

- All Implemented Interfaces:
    ISCacheConsistencyManagerMBean

      public class ISCacheConsistencyManager
      extends java.lang.Object
      implements ISCacheConsistencyManagerMBean

  Implementation of the `ISCacheConsistencyManagerMBean`
  Author:
    UoA

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ISCacheConsistencyManager(ISCache cache)` public constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addCCManager(java.lang.String CCManagerFQName)` Add new Cache Consistency Manager (CCM).
    `boolean` | `addCCManagerDynamic(java.lang.String CCManagerFQName, java.lang.String codebase)` Add new Cache Consistency Manager (CCM).
    `boolean` | `delCCManager(java.lang.String CCManagerFQName)` Add new Cache Consistency Manager (CCM).
    `java.lang.String` | `getActiveCCManager()` Get the active CCM.
    `(package private) java.util.Set<java.lang.String>` | `getCCManagerFQNames()` Getter of the `CCManagerFQNames`
    `java.lang.String[]` | `getCCManagers()` Get all registered Cache Consistency Managers (CCMs).
    `void` | `nullifyActiveCCManager()` Nullify active CCManager
    `void` | `setActiveCCManager(java.lang.String CCManagerFQName)` Add new Cache Consistency Manager (CCM).
    `(package private) void` | `setCCManagerFQNames(java.util.Set<java.lang.String> cCManagerFQNames)` Setter of the `CCManagerFQNames`
    `protected void` | `unregisterCCManager(java.lang.Class c)` Unregister the CCMBean from the JMX server.Note that in the future, there will be a finalization method invocation on the CCM instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ISCacheConsistencyManager

          public ISCacheConsistencyManager(ISCache cache)

      public constructor
      Parameters:
        `cache` - the cache object which can either be empty or define some default cached data.

  - ### Method Detail

    - #### unregisterCCManager

          protected void unregisterCCManager(java.lang.Class c)
                                      throws java.lang.Exception

      Unregister the CCMBean from the JMX server.Note that in the future, there will be a finalization method invocation on the CCM instance.
      Parameters:
        `c` - CCMBean class object
      Throws:
        `java.lang.Exception` - in case of error; most probably raised at the MBean unregistration

    - #### addCCManager

          public boolean addCCManager(java.lang.String CCManagerFQName)
                               throws java.lang.Exception

      Add new Cache Consistency Manager (CCM).
      Specified by:
        `addCCManager` in interface `ISCacheConsistencyManagerMBean`
      Parameters:
        `CCManagerFQName` - CCM fully qualified (FQ) class name
      Returns:
        true if this set did not already contain the specified element; false otherwise
      Throws:
        `java.lang.Exception` - in case of error; most probably due to non-accessibility to the specified class
      See Also:
        `ISCacheConsistencyManagerMBean.addCCManager(String)`

    - #### addCCManagerDynamic

          public boolean addCCManagerDynamic(java.lang.String CCManagerFQName,
                                    java.lang.String codebase)
                                      throws java.lang.Exception

      Add new Cache Consistency Manager (CCM).
      Specified by:
        `addCCManagerDynamic` in interface `ISCacheConsistencyManagerMBean`
      Parameters:
        `CCManagerFQName` - CCM fully qualified (FQ) class name
        `codebase` - URL of the jar file that contains the specified class
      Returns:
        true if this set did not already contain the specified element; false otherwise
      Throws:
        `java.lang.Exception` - in case of error; most probably due to non-accessibility to the specified class
      See Also:
        `ISCacheConsistencyManagerMBean.addCCManagerDynamic(String, String)`

    - #### delCCManager

          public boolean delCCManager(java.lang.String CCManagerFQName)
                               throws java.lang.Exception

      Add new Cache Consistency Manager (CCM).
      Specified by:
        `delCCManager` in interface `ISCacheConsistencyManagerMBean`
      Parameters:
        `CCManagerFQName` - CCM fully qualified (FQ) class name
        `codebase` - URL of the jar file that contains the specified class
      Returns:
        true if this set did not already contain the specified element; false otherwise
      Throws:
        `java.lang.Exception` - in case of error; most probably due to non-accessibility to the specified class
      See Also:
        `ISCacheConsistencyManagerMBean.delCCManager(String)`

    - #### getCCManagers

          public java.lang.String[] getCCManagers()

      Get all registered Cache Consistency Managers (CCMs).
      Specified by:
        `getCCManagers` in interface `ISCacheConsistencyManagerMBean`
      Returns:
        all registered Cache Consistency Managers (CCMs)
      See Also:
        `ISCacheConsistencyManagerMBean.getCCManagers()`

    - #### setActiveCCManager

          public void setActiveCCManager(java.lang.String CCManagerFQName)
                                  throws java.lang.Exception

      Add new Cache Consistency Manager (CCM).
      Specified by:
        `setActiveCCManager` in interface `ISCacheConsistencyManagerMBean`
      Parameters:
        `CCManagerFQName` - CCM fully qualified (FQ) class name
        `codebase` - URL of the jar file that contains the specified class
      Throws:
        `java.lang.Exception` - in case of error; most probably due to non-accessibility to the specified class
      See Also:
        `ISCacheConsistencyManagerMBean.setActiveCCManager(String)`

    - #### nullifyActiveCCManager

          public void nullifyActiveCCManager()
                                      throws java.lang.Exception

      Nullify active CCManager
      Throws:
        `java.lang.Exception` - in case of error

    - #### setCCManagerFQNames

          void setCCManagerFQNames(java.util.Set<java.lang.String> cCManagerFQNames)

      Setter of the `CCManagerFQNames`

    - #### getCCManagerFQNames

          java.util.Set<java.lang.String> getCCManagerFQNames()

      Getter of the `CCManagerFQNames`
      Returns:
        the CCManagerFQNames

    - #### getActiveCCManager

          public java.lang.String getActiveCCManager()
                                              throws java.lang.Exception

      Get the active CCM.
      Specified by:
        `getActiveCCManager` in interface `ISCacheConsistencyManagerMBean`
      Returns:
        the active CCM
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheConsistencyManagerMBean.getActiveCCManager()`