Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setPeerClassLoadingLocalClassPathExclude()

The following examples show how to use org.apache.ignite.configuration.IgniteConfiguration#setPeerClassLoadingLocalClassPathExclude() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridMultipleVersionsDeploymentSelfTest.java    From ignite with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridDeploymentTestJob.class.getName(),
        GridDeploymentTestTask.class.getName());

    // Following tests makes sense in ISOLATED modes (they redeploy tasks
    // and don't change task version. The different tasks with the same version from the same node
    // executed in parallel - this does not work in share mode.)
    cfg.setDeploymentMode(DeploymentMode.ISOLATED);

    cfg.setPeerClassLoadingLocalClassPathExclude(
        "org.apache.ignite.internal.GridMultipleVersionsDeploymentSelfTest*");

    cfg.setIncludeEventTypes(EventType.EVTS_ALL);

    return cfg;
}
 
Example 2
Source File: GridP2PRemoteClassLoadersSelfTest.java    From ignite with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(
        GridP2PRemoteTestTask.class.getName(),
        GridP2PRemoteTestTask1.class.getName(),
        GridP2PRemoteTestJob.class.getName(),
        GridP2PRemoteClassLoadersSelfTest.class.getName()
    );

    cfg.setDeploymentMode(depMode);

    return cfg;
}
 
Example 3
Source File: P2PGridifySelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridP2PTestTask.class.getName(), GridP2PTestJob.class.getName());

    cfg.setDeploymentMode(depMode);

    return cfg;
}
 
Example 4
Source File: IgniteExplicitImplicitDeploymentSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridDeploymentResourceTestTask.class.getName(),
        GridDeploymentResourceTestJob.class.getName());

    cfg.setDeploymentMode(DeploymentMode.ISOLATED);

    return cfg;
}
 
Example 5
Source File: GridP2PDoubleDeploymentSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridP2PTestTask.class.getName(),
            GridP2PTestJob.class.getName());

    // Test requires SHARED mode to test local deployment priority over p2p.
    cfg.setDeploymentMode(depMode);

    cfg.setCacheConfiguration();

    return cfg;
}
 
Example 6
Source File: GridCacheP2PUndeploySelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

        cfg.setNetworkTimeout(2000);

        cfg.setMarshaller(new JdkMarshaller());

        CacheConfiguration repCacheCfg = defaultCacheConfiguration();

        repCacheCfg.setName("replicated");
        repCacheCfg.setCacheMode(REPLICATED);
        repCacheCfg.setRebalanceMode(mode);
        repCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
        repCacheCfg.setAtomicityMode(TRANSACTIONAL);

        // TODO GG-10884.
//        if (offheap)
//            repCacheCfg.setOffHeapMaxMemory(OFFHEAP);
//        else
//            repCacheCfg.setSwapEnabled(true);

        CacheConfiguration partCacheCfg = defaultCacheConfiguration();

        partCacheCfg.setName("partitioned");
        partCacheCfg.setCacheMode(PARTITIONED);
        partCacheCfg.setRebalanceMode(mode);
        partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(11, 1));
        partCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
        partCacheCfg.setAtomicityMode(TRANSACTIONAL);

        // TODO GG-10884.
//        if (offheap)
//            partCacheCfg.setOffHeapMaxMemory(OFFHEAP);
//        else
//            partCacheCfg.setSwapEnabled(true);

        cfg.setCacheConfiguration(repCacheCfg, partCacheCfg);

        cfg.setDeploymentMode(SHARED);
        cfg.setPeerClassLoadingLocalClassPathExclude(GridCacheP2PUndeploySelfTest.class.getName());

        cfg.setUserAttributes(F.asMap(GridCacheModuloAffinityFunction.IDX_ATTR, idxGen.getAndIncrement()));

        return cfg;
    }
 
Example 7
Source File: GridP2PMissedResourceCacheSizeSelfTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridP2PTestTask.class.getName(), GridP2PTestJob.class.getName());

    cfg.setDeploymentMode(depMode);

    cfg.setPeerClassLoadingMissedResourcesCacheSize(missedRsrcCacheSize);

    cfg.setCacheConfiguration();

    return cfg;
}
 
Example 8
Source File: GridP2PTimeoutSelfTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(GridP2PTestTask.class.getName(), GridP2PTestJob.class.getName());

    cfg.setDeploymentMode(depMode);

    cfg.setNetworkTimeout(1000);

    return cfg;
}
 
Example 9
Source File: GridP2PHotRedeploymentSelfTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    // Override P2P configuration to exclude Task and Job classes
    cfg.setPeerClassLoadingLocalClassPathExclude(TASK_NAME);

    cfg.setDeploymentMode(depMode);

    cfg.setNetworkTimeout(P2P_TIMEOUT);

    return cfg;
}