ISCache
Date: 2014-11-12

org.gcube.informationsystem.cache

## Class ISCache

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

- All Implemented Interfaces:
    ISCacheMBean

      public class ISCache
      extends java.lang.Object
      implements ISCacheMBean

  Implementation of the `ISCacheMBean` interface.
  Version:
    0.9
  Author:
    UoA

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ISCache(GCUBEScope scope)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addFilterCriterion(Srv srv, java.lang.String srvType, java.lang.String critVar, java.lang.String critVal)` Add new filtering criterion on a specific service on a given type.
    `boolean` | `addFilterCriterion(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType, java.lang.String critVar, java.lang.String critVal)` Add new filtering criterion on a specific service on a given type.
    `boolean` | `delAllFilterCriterion(Srv srv, java.lang.String srvType)` Delete all filtering criteria from a specific service of a given type.
    `boolean` | `delAllFilterCriterion(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType)` Delete all filtering criteria from a specific service of a given type.
    `boolean` | `delFilterCriterion(Srv srv, java.lang.String srvType, java.lang.String critVar)` Delete all filtering criteria from a specific service of a given type.
    `boolean` | `delFilterCriterion(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType, java.lang.String critVar)` Delete all filtering criteria from a specific service of a given type.
    `java.lang.String[]` | `getAllFilterCriteria(Srv srv, java.lang.String srvType)` Get all filtering criteria from a specific service of a given type.
    `java.lang.String[]` | `getAllFilterCriteria(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType)` Get all filtering criteria from a specific service of a given type.
    `org.apache.axis.message.addressing.EndpointReference[]` | `getEPRsFor(Srv srv)` Get the running instances (array of URLs) of the specified service
    `org.apache.axis.message.addressing.EndpointReference[]` | `getEPRsFor(Srv srv, java.lang.String srvType)` Get the running instances (array of URLs) of the specified service
    `org.apache.axis.message.addressing.EndpointReference[]` | `getEPRsFor(java.lang.String srvClass, java.lang.String srvName)` Get the running instances (array of URLs) of the specified service
    `org.apache.axis.message.addressing.EndpointReference[]` | `getEPRsFor(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType)` Get the running instances (array of URLs) of the specified service
    `SrvRegistry` | `getRegistry()`
    `int` | `getSrvNumber()` Get number of registered services
    `Srv[]` | `getSrvs()` Get registered services
    `java.lang.String[]` | `getSrvsStr()` Get registered services
    `void` | `setRegistry(SrvRegistry registry)`

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

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

- - ### Constructor Detail

    - #### ISCache

          public ISCache(GCUBEScope scope)

      Constructor
      Parameters:
        `scope` - scope

  - ### Method Detail

    - #### getSrvs

          public Srv[] getSrvs()

      Get registered services
      Returns:
        array of `Srv` instances

    - #### getEPRsFor

          public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv)
                                                                            throws java.lang.Exception

      Get the running instances (array of URLs) of the specified service
      Specified by:
        `getEPRsFor` in interface `ISCacheMBean`
      Parameters:
        `srv` - service
      Returns:
        the running instances (array of URLs) of the specified service
      Throws:
        `java.lang.Exception` - in case of error; most probably due to the fact that the specified service is not registered.
      See Also:
        `ISCacheMBean.getEPRsFor(Srv)`

    - #### getEPRsFor

          public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass,
                                                                          java.lang.String srvName)
                                                                            throws java.lang.Exception

      Get the running instances (array of URLs) of the specified service
      Specified by:
        `getEPRsFor` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service class
        `srvName` - service name
      Returns:
        the running instances (array of URLs) of the specified service
      Throws:
        `java.lang.Exception` - in case of error; most probably due to the fact that the specified service is not registered.
      See Also:
        `ISCacheMBean.getEPRsFor(String, String)`

    - #### getEPRsFor

          public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv,
                                                                          java.lang.String srvType)
                                                                            throws java.lang.Exception

      Get the running instances (array of URLs) of the specified service
      Specified by:
        `getEPRsFor` in interface `ISCacheMBean`
      Parameters:
        `srv` - service
        `srvType` - service type
      Returns:
        the running instances (array of URLs) of the specified service
      Throws:
        `java.lang.Exception` - in case of error; most probably due to the fact that the specified service is not registered.
      See Also:
        `ISCacheMBean.getEPRsFor(Srv, String)`

    - #### getEPRsFor

          public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass,
                                                                          java.lang.String srvName,
                                                                          java.lang.String srvType)
                                                                            throws java.lang.Exception

      Get the running instances (array of URLs) of the specified service
      Specified by:
        `getEPRsFor` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `srvType` - service type
      Returns:
        the running instances (array of URLs) of the specified service
      Throws:
        `java.lang.Exception` - in case of error; most probably due to the fact that the specified service is not registered.
      See Also:
        `ISCacheMBean.getEPRsFor(String, String, String)`

    - #### getSrvNumber

          public int getSrvNumber()

      Get number of registered services
      Specified by:
        `getSrvNumber` in interface `ISCacheMBean`
      Returns:
        the number of registered services
      See Also:
        `ISCacheMBean.getSrvNumber()`

    - #### getSrvsStr

          public java.lang.String[] getSrvsStr()

      Get registered services
      Specified by:
        `getSrvsStr` in interface `ISCacheMBean`
      Returns:
        the registered services
      See Also:
        `ISCacheMBean.getSrvsStr()`

    - #### addFilterCriterion

          public boolean addFilterCriterion(java.lang.String srvClass,
                                   java.lang.String srvName,
                                   java.lang.String srvType,
                                   java.lang.String critVar,
                                   java.lang.String critVal)
                                     throws java.lang.Exception

      Add new filtering criterion on a specific service on a given type. This filtering criterion applies only for the given service type.
      Specified by:
        `addFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `srvType` - service type
        `critVar` - criterion r-value
        `critVal` - criterion l-value
      Returns:
        true if the critVar has not been added before; false otherwise
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.addFilterCriterion(String, String, String, String, String)`

    - #### addFilterCriterion

          public boolean addFilterCriterion(Srv srv,
                                   java.lang.String srvType,
                                   java.lang.String critVar,
                                   java.lang.String critVal)
                                     throws java.lang.Exception

      Add new filtering criterion on a specific service on a given type. This filtering criterion applies only for the given service type.
      Specified by:
        `addFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srv` - service instance
        `srvType` - service type
        `critVar` - criterion r-value
        `critVal` - criterion l-value
      Returns:
        true if the critVar has not been added before; false otherwise
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.addFilterCriterion(Srv, String, String, String)`

    - #### delAllFilterCriterion

          public boolean delAllFilterCriterion(java.lang.String srvClass,
                                      java.lang.String srvName,
                                      java.lang.String srvType)
                                        throws java.lang.Exception

      Delete all filtering criteria from a specific service of a given type.
      Specified by:
        `delAllFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `srvType` - service type
      Returns:
        true if the given service type already had some criteria; false otherwise
      Throws:
        `java.lang.Exception` - in
      See Also:
        `ISCacheMBean.delAllFilterCriterion(String, String, String)`

    - #### delAllFilterCriterion

          public boolean delAllFilterCriterion(Srv srv,
                                      java.lang.String srvType)
                                        throws java.lang.Exception

      Delete all filtering criteria from a specific service of a given type.
      Specified by:
        `delAllFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srv` - service
        `srvType` - service type
      Returns:
        true if the given service type already had some criteria; false otherwise
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.delAllFilterCriterion(Srv, String)`

    - #### delFilterCriterion

          public boolean delFilterCriterion(java.lang.String srvClass,
                                   java.lang.String srvName,
                                   java.lang.String srvType,
                                   java.lang.String critVar)
                                     throws java.lang.Exception

      Delete all filtering criteria from a specific service of a given type.
      Specified by:
        `delFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `srvType` - service type
        `critVar` - criterion r-value
      Returns:
        true if the given service type already had some criteria; false otherwise
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.delFilterCriterion(String, String, String, String)`

    - #### delFilterCriterion

          public boolean delFilterCriterion(Srv srv,
                                   java.lang.String srvType,
                                   java.lang.String critVar)
                                     throws java.lang.Exception

      Delete all filtering criteria from a specific service of a given type.
      Specified by:
        `delFilterCriterion` in interface `ISCacheMBean`
      Parameters:
        `srv` - service
        `srvType` - service type
        `critVar` - criterion r-value
      Returns:
        true if the given service type already had some criteria; false otherwise
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.delFilterCriterion(Srv, String, String)`

    - #### getAllFilterCriteria

          public java.lang.String[] getAllFilterCriteria(java.lang.String srvClass,
                                                java.lang.String srvName,
                                                java.lang.String srvType)
                                                  throws java.lang.Exception

      Get all filtering criteria from a specific service of a given type.
      Specified by:
        `getAllFilterCriteria` in interface `ISCacheMBean`
      Parameters:
        `srvClass` - service instance
        `srvName` - service name
        `srvType` - service type
      Returns:
        list of all criteria; key: criterion variable, value: criterion value
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.getAllFilterCriteria(String, String, String)`

    - #### getAllFilterCriteria

          public java.lang.String[] getAllFilterCriteria(Srv srv,
                                                java.lang.String srvType)
                                                  throws java.lang.Exception

      Get all filtering criteria from a specific service of a given type.
      Specified by:
        `getAllFilterCriteria` in interface `ISCacheMBean`
      Parameters:
        `srv` - service instance
        `srvType` - service type
      Returns:
        list of all criteria; key: criterion variable, value: criterion value
      Throws:
        `java.lang.Exception` - in case of error
      See Also:
        `ISCacheMBean.getAllFilterCriteria(Srv, String)`

    - #### setRegistry

          public void setRegistry(SrvRegistry registry)

      Parameters:
        `registry` - the registry to set

    - #### getRegistry

          public SrvRegistry getRegistry()

      Returns:
        the registry