Examples of PolicyCache


Examples of com.volantis.mcs.runtime.policies.cache.PolicyCache

            CacheControlConstraints defaultRemoteCacheControlConstraints =
                    createRemoteCacheControlConstraints();

            // Create the policy cache.
            PolicyCache policyCache = createPolicyCache(
                    defaultRemoteCacheControlConstraints);

            RemoteReadersFactory remoteReadersFactory =
                    createRemoteReadersFactory();

            // Create the ProjectManager.
            ProjectLoader projectLoader = createProjectLoader();

            RepositoryContainer repositoryContainer =
                    new RepositoryContainer(jdbcRepository, xmlRepository);

            // Create the remote project specific constraints.
            CacheControlConstraintsMap defaultRemoteCacheControlConstraintsMap
                    = createRemoteCacheControlConstraintsMap(
                            defaultRemoteCacheControlConstraints);

            // Create the local project specific constraints.
            CacheControlConstraintsMap defaultLocalCacheControlConstraintsMap
                    = createLocalCacheControlConstraintsMap();

            PopulatableProjectManager projectManager =
                    new ProjectManagerImpl(projectLoader,
                            new RuntimeProjectConfiguratorImpl(
                                    defaultLocalCacheControlConstraintsMap,
                                    defaultRemoteCacheControlConstraintsMap,
                                    pathURLMapper, policyCache),
                            repositoryContainer,
                            remoteReadersFactory);

            // Create the activator.
            PolicyReferenceFactory referenceFactory =
                    new PolicyReferenceFactoryImpl(projectManager);

            PolicyActivator policyActivator =
                    initializeRepositoryObjectActivators(referenceFactory);

            // Create the retriever to use to retrieve activated policies from
            // any source.
            RuntimePolicyFactory runtimePolicyFactory =
                    RuntimePolicyFactory.getDefaultInstance();

            ActivatedPolicyRetriever activatedPolicyRetriever =
                    runtimePolicyFactory.createCachingRetriever(
                            policyActivator, projectManager, policyCache);

            policyFetcher = new PolicyFetcherImpl(activatedPolicyRetriever);

            // Initialize the projects

            projectManager.createPredefinedProjects(projects, configContext,
                    defaultLocalCacheControlConstraintsMap,
                    policyCache.getLocalDefaultGroup());
            RuntimeProject defaultProject = projectManager.getDefaultProject();

            // Determine the repository within which the default project
            // resides.
            LocalRepository defaultRepository;
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.