Examples of QOSPolicy


Examples of org.nasutekds.server.api.QOSPolicy

      throw new InitializationException(message, e);
    }

    // Perform the necessary initialization for the network group
    // policy.
    QOSPolicy policy;

    try
    {
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      Method method =
          theClass.getMethod("createQOSPolicy", policyConfiguration
              .configurationClass());

      policy = (QOSPolicy) method.invoke(factory, policyConfiguration);
    }
    catch (Exception e)
    {
      if (e instanceof InvocationTargetException)
      {
        Throwable t = e.getCause();

        if (t instanceof InitializationException)
        {
          throw (InitializationException) t;
        }
        else if (t instanceof ConfigException)
        {
          throw (ConfigException) t;
        }
      }

      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }

      Message message =
          ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get(String
              .valueOf(className), String.valueOf(policyConfiguration
              .dn()), stackTraceToSingleLineString(e));
      throw new InitializationException(message, e);
    }

    // The network group has been successfully initialized - so register
    // it.
    QOSPolicy oldPolicy =
        policies.put(policyConfiguration.dn(), policy);

    if (policy instanceof RequestFilteringPolicy)
    {
      requestFilteringPolicy = (RequestFilteringPolicy) policy;
    }
    else if (policy instanceof ResourceLimitsPolicy)
    {
      resourceLimitsPolicy = (ResourceLimitsPolicy) policy;
    }

    if (oldPolicy != null)
    {
      oldPolicy.finalizeQOSPolicy();
    }
  }
View Full Code Here

Examples of org.nasutekds.server.api.QOSPolicy

     * {@inheritDoc}
     */
    public ConfigChangeResult applyConfigurationDelete(
        QOSPolicyCfg configuration)
    {
      QOSPolicy policy = policies.remove(configuration.dn());

      if (policy != null)
      {
        if (requestFilteringPolicy == policy)
        {
          requestFilteringPolicy = null;
        }
        else if (resourceLimitsPolicy == policy)
        {
          resourceLimitsPolicy = null;
        }

        policy.finalizeQOSPolicy();
      }

      return new ConfigChangeResult(ResultCode.SUCCESS, false);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.