Package org.jgroups

Examples of org.jgroups.JChannelFactory$MuxFactoryChannelListener


                    String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, null);
                    if (muxStacks == null) {
                      muxStacks = PropertiesHelper.getString(LEGACY_CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
                    }
                    if (muxStacks != null) {
                        channelFactory = new JChannelFactory();
                        channelFactory.setMultiplexerConfig(muxStacks);
                    }
                }
               
                String factoryRes = PropertiesHelper.getString(CACHE_FACTORY_RESOURCE_PROP, properties, null);
View Full Code Here


 
 
  try {
      if(use_replicated_hashtable) {
    ht=new ReplicatedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    ((ReplicatedHashtable)ht).addNotifier(new Notifier(NUM_ITEMS));
      }
      else {
    ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    // ((DistributedHashtable)ht).addNotifier(new MyNotifier());
      }

      System.out.println("Hashtable already has " + ht.size() + " items");
View Full Code Here

    public static void main(String[] args)
    {
        String groupname = "QueueDemo";
        DistributedQueueDemo client = new DistributedQueueDemo();
        ChannelFactory factory = new JChannelFactory();
        String arg;
        String next_arg;
        boolean trace = false;
        boolean persist = false;
View Full Code Here

    }


    public static void main(String args[]) {
        DistributedHashtableDemo  client=new DistributedHashtableDemo();
        ChannelFactory            factory=new JChannelFactory();
        String                    arg;
        boolean                   persist=false;

        // test for pbcast
        /*
 
View Full Code Here

   {     
      super.setUp();
     
      if (this.channelFactory == null)
      {
         this.channelFactory = new JChannelFactory();
         this.channelFactory.setMultiplexerConfig(this.jgConfig);
      }
     
      CacheManagerImpl jbcFactory = new CacheManagerImpl(this.jbcConfig, this.channelFactory);
      this.cacheManagerRef.set(jbcFactory);
View Full Code Here

        Cache remoteCache = DefaultCacheFactory.getInstance().createCache(SharedCacheInstanceManager.DEFAULT_CACHE_RESOURCE, false);
       
        // This test assumes replication; verify that's correct
        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
View Full Code Here

            // Get path to JGroups configuration
            String jgroupsConfigurationFilePath = parameterEntry.getParameterValue(JGROUPS_CONFIG);
            if (jgroupsConfigurationFilePath != null)
            {
               // Create and inject multiplexer factory
               JChannelFactory muxFactory = new JChannelFactory();
               muxFactory.setMultiplexerConfig(configurationManager.getResource(jgroupsConfigurationFilePath));
               cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(muxFactory);
               log.info("Multiplexer stack successfully enabled for the cache.");
            }
         }
         catch (Exception e)
View Full Code Here

   {     
      super.setUp();
     
      if (this.channelFactory == null)
      {
         this.channelFactory = new JChannelFactory();
         this.channelFactory.setMultiplexerConfig(this.jgConfig);
      }
     
      CacheManagerImpl jbcFactory = new CacheManagerImpl(this.jbcConfig, this.channelFactory);
      this.cacheManagerRef.set(jbcFactory);
View Full Code Here

        Cache remoteCache = DefaultCacheFactory.getInstance().createCache(SharedCacheInstanceManager.DEFAULT_CACHE_RESOURCE, false);
       
        // This test assumes replication; verify that's correct
        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
View Full Code Here

    *
    * @throws Exception
    */
   public void testBasic() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml"); // the default stacks in jgroups.jar
      CacheManagerImpl registry = new CacheManagerImpl(DEFAULT_CONFIGURATION_FILE, cf);
      registry.start();

      ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();

View Full Code Here

TOP

Related Classes of org.jgroups.JChannelFactory$MuxFactoryChannelListener

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.