Examples of PolicyType


Examples of com.volantis.mcs.policies.PolicyType

        }

        Group policyGroup = null;
        if (policy != null) {
            // Get the group specific to the policy type.
            PolicyType policyType = policy.getPolicyType();
            policyGroup = baseGroup.findGroup(policyType);
        }

        if (policyGroup == null) {
            policyGroup = baseGroup;
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

    public ActivatedPolicy activate(
            RuntimeProject actualProject, PolicyBuilder policyBuilder,
            RuntimeProject logicalProject) {

        // Activate the cache control
        PolicyType policyType = policyBuilder.getPolicyType();
        CacheControlConstraintsMap constraintsMap =
                logicalProject.getCacheControlConstraintsMap();
        CacheControlConstraints constraints = constraintsMap.getConstraints(
                policyType);
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

        PolicyActivator variablePolicyActivator =
                new VariablePolicyActivator(referenceFactory);
        for (Iterator i = VariablePolicyType.getVariablePolicyTypes().iterator();
             i.hasNext();) {
            PolicyType policyType = (PolicyType) i.next();

            PolicyActivator activator;
            if (policyType == PolicyType.THEME) {
                activator = new ThemeActivator(referenceFactory);
            } else if (policyType == PolicyType.LAYOUT) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

        SeparateCacheControlConstraintsMap map = new SeparateCacheControlConstraintsMap();

        // Now create the set of defaults for the different policy types.
        Collection policyTypes = PolicyType.getPolicyTypes();
        for (Iterator i = policyTypes.iterator(); i.hasNext();) {
            PolicyType policyType = (PolicyType) i.next();
            PolicyCacheConfiguration configuration =
                    getPolicyCacheConfiguration(policyType);
            Boolean allowCacheThisPolicy;
            Integer timeout;
            if (configuration == null) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

        int localSize = 0;
        Collection policyTypes = PolicyType.getPolicyTypes();
        for (Iterator i = policyTypes.iterator();
             i.hasNext() && localSize < Integer.MAX_VALUE;) {

            PolicyType policyType = (PolicyType) i.next();
            PolicyCacheConfiguration groupConfiguration =
                    getPolicyCacheConfiguration(policyType);
            if (groupConfiguration != null) {
                Integer integer = groupConfiguration.getMaxEntries();
                if (integer != null) {
                    if (integer.intValue() != -1) {
                        localSize += integer.intValue();
                    } else {
                        localSize = Integer.MAX_VALUE;
                    }
                } else {
                    localSize = Integer.MAX_VALUE;
                }
            }
        }

        // If the local size is still 0 then set it to one so that the cache
        // can be built.
        if (localSize == 0) {
            localSize = 1;
        }

        RemotePoliciesConfiguration remotePolicies =
                marinerConfig.getRemotePolicies();
        RemotePolicyCacheConfiguration policyCacheConfiguration =
                remotePolicies.getPolicyCache();
        if (policyCacheConfiguration == null) {
            policyCacheConfiguration = new RemotePolicyCacheConfiguration();
        }

        int remoteSize;
        remoteSize = getInteger(policyCacheConfiguration.getMaxCacheSize(),
                DEFAULT_REMOTE_GROUP_SIZE);

        PolicyCacheBuilder builder = new PolicyCacheBuilder(
                localSize, remoteSize);

        CacheControlConstraints localConstraints = createLocalCacheConstraints(
                Boolean.TRUE, null);

        PolicyCachePartitionConstraints localPartitionConstraints =
                createPartitionConstraints(localSize, localConstraints);

        builder.setLocalPartitionConstraints(localPartitionConstraints);

        PolicyCachePartitionConstraints remotePartitionConstraints =
                createPartitionConstraints(remoteSize, remoteConstraints);

        builder.setRemotePartitionConstraints(remotePartitionConstraints);

        // Now build the policy specific groups to the local group.
        for (Iterator i = policyTypes.iterator(); i.hasNext();) {

            PolicyType policyType = (PolicyType) i.next();
            PolicyCacheConfiguration groupConfiguration =
                    getPolicyCacheConfiguration(policyType);
            int maxCount;
            if (groupConfiguration == null) {
                // Allow some entries in the group to ensure that when a policy
View Full Code Here

Examples of org.alfresco.repo.policy.PolicyType

  @SuppressWarnings("unchecked")
  private Map<PolicyType, List<Class<? extends Policy>>> getPolicyInterfacesByType(final Class<?> clazz) {
    final Map<PolicyType, List<Class<? extends Policy>>> policyInterfacesByType = new HashMap<PolicyType, List<Class<? extends Policy>>>();
    for (final Class<?> interfaceClass : clazz.getInterfaces()) {
      PolicyType policyType = null;
      if (org.alfresco.repo.policy.ClassPolicy.class.isAssignableFrom(interfaceClass)) {
        policyType = PolicyType.Class;
      } else if (org.alfresco.repo.policy.AssociationPolicy.class.isAssignableFrom(interfaceClass)) {
        policyType = PolicyType.Association;
      } else if (org.alfresco.repo.policy.PropertyPolicy.class.isAssignableFrom(interfaceClass)) {
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.PolicyType

        if (tm != null) {
            typeMap = tm;
        } else {
            typeMap = TypeMapCache.get(binding.getService());
        }
        PolicyType policy = ei.getExtensor(PolicyType.class);
        if (policy != null) {
            poaName = policy.getPoaname();
            isPersistent = policy.isPersistent();
            serviceId = policy.getServiceid();           
        }
    }
View Full Code Here

Examples of org.apache.falcon.entity.v0.process.PolicyType

                return;
            }

            int attempts = retry.getAttempts();
            Frequency delay = retry.getDelay();
            PolicyType policy = retry.getPolicy();
            int intRunId = Integer.parseInt(runId);

            if (attempts > intRunId) {
                AbstractRerunPolicy rerunPolicy = RerunPolicyFactory.getRetryPolicy(policy);
                long delayTime = rerunPolicy.getDelay(delay, Integer.parseInt(runId));
View Full Code Here

Examples of org.apache.falcon.entity.v0.process.PolicyType

                return;
            }

            int attempts = retry.getAttempts();
            Frequency delay = retry.getDelay();
            PolicyType policy = retry.getPolicy();
            int intRunId = Integer.parseInt(runId);

            if (attempts > intRunId) {
                AbstractRerunPolicy rerunPolicy = RerunPolicyFactory.getRetryPolicy(policy);
                long delayTime = rerunPolicy.getDelay(delay, Integer.parseInt(runId));
View Full Code Here

Examples of org.apache.ivory.entity.v0.process.PolicyType

    if (lateProcess == null) {
      LOG.warn("Late run not applicable for entity:"
          + entity.getEntityType() + "(" + entity.getName() + ")");
      return -1;
    }
    PolicyType latePolicy = lateProcess.getPolicy();
    Date cutOffTime = getCutOffTime(entity, nominalTime);
    Date now = new Date();
    Long wait = null;

    if (now.after(cutOffTime)) {
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.