Package com.volantis.cache

Examples of com.volantis.cache.CacheFactory


        partitions = new ArrayList();

        // Iterate over all the partitions in the builder creating a group for
        // them.
        CacheFactory factory = CacheFactory.getDefaultInstance();
        for (Iterator i = partitionList.iterator(); i.hasNext();) {
            RemotePartitionsBuilder.Partition builderQuota =
                    (RemotePartitionsBuilder.Partition) i.next();
            GroupBuilder groupBuilder = factory.createGroupBuilder();
            groupBuilder.setMaxCount(builderQuota.getSize());
            String prefix = builderQuota.getPrefix();
            Group group = defaultRemoteGroup.addGroup(prefix,
                    groupBuilder);
View Full Code Here


                    partition.getSize());
            if (partitionSize < 1) {
                throw new IllegalStateException("Partition size must be >= 1");
            }

            CacheFactory cacheFactory = CacheFactory.getDefaultInstance();
            GroupBuilder groupBuilder = cacheFactory.createGroupBuilder();
            groupBuilder.setMaxCount(partitionSize);
            Group partitionGroup = baseGroup.addGroup(
                    configuration.getLocation(), groupBuilder);

            // Create the base constraints for the partition. These will
            // be used to derive the constraints for the type specific
            // partitions.
            CacheControlConstraints base =
                    new CacheControlConstraints(
                            partitionConstraints.getConstraints(),
                            partitionConfiguration);

            builder.setCacheControlDefaults(base.getDefaultCacheControl());

            SeparateCacheControlConstraintsMap constraintsMap =
                    new SeparateCacheControlConstraintsMap();
            for (Iterator i = PolicyType.getPolicyTypes().iterator(); i.hasNext();) {
                PolicyType policyType = (PolicyType) i.next();
                PolicyTypePartitionConfiguration typePartitionConfiguration =
                        partition.getTypePartition(policyType);
                CacheControlConstraints typeConstraints;
                groupBuilder = cacheFactory.createGroupBuilder();
                if (typePartitionConfiguration == null) {
                    typeConstraints = base;
                    groupBuilder.setMaxCount(partitionSize);
                } else {
                    RemotePolicyCacheConfiguration typeConfiguration =
View Full Code Here

TOP

Related Classes of com.volantis.cache.CacheFactory

Copyright © 2018 www.massapicom. 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.