Package org.jgroups

Examples of org.jgroups.JChannelFactory


        new DrawMultiplexer().start(props, stack_name);
    }


    private void start(String props, String stack_name) throws Exception {
        factory=new JChannelFactory();
        factory.setMultiplexerConfig(props);

        final Channel ch1, ch2;
        ch1=factory.createMultiplexerChannel(stack_name, "id-1");
        Draw draw1=new Draw(ch1);
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

    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

    Thread t=null;


    public void start(String props, long timeout) throws Exception {
        this.timeout=timeout;
        ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, timeout);
    }
View Full Code Here

      {               
         muxFactory = new JChannelFactory[getMuxFactoryCount()];
        
         for (int i = 0; i < muxFactory.length; i++)
         {
            muxFactory[i] = new JChannelFactory();
            muxFactory[i].setMultiplexerConfig(MUX_CHANNEL_CONFIG);
         }               
      }
     
      if (shouldCompareThreadCount())
View Full Code Here

 
 
  try {
      if(use_replicated_hashtable) {
    ht=new ReplicatedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    if(debug) {
        debugger=new Debugger((JChannel)((ReplicatedHashtable)ht).getChannel(), cummulative);
    }
    ((ReplicatedHashtable)ht).addNotifier(new Notifier(NUM_ITEMS));
      }
      else {
    ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    if(debug) {
        debugger=new Debugger((JChannel)((DistributedHashtable)ht).getChannel(), cummulative);
    }
    // ((DistributedHashtable)ht).addNotifier(new MyNotifier());
      }
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
      CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
      registry.start();

      ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();

View Full Code Here

      assertEquals(cacheNames, registry.getConfigurationNames());
   }

   public void testNullConfigResource() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml"); // the default stacks in jgroups.jar
      String configResource = null;
      CacheManager registry = new CacheManager(configResource, cf);
      registry.start();

      assertEquals("No configs", 0, registry.getConfigurationNames().size());
View Full Code Here

      assertEquals("No configs", 0, registry.getConfigurationNames().size());
   }
  
   public void testEagerStartCaches() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml");
      cf.setExposeChannels(false);
      cf.start();
      CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
     
      Set<String> cores = new HashSet<String>();
      cores.add("ha-partition");
      cores.add("local-query");
View Full Code Here

     
   }
  
   public void testAliasing() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml");
      cf.setExposeChannels(false);
      cf.start();
      CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
      registry.start();

      Set<String> configNames = registry.getConfigurationNames();
      assertEquals(17, configNames.size());
View Full Code Here

TOP

Related Classes of org.jgroups.JChannelFactory

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.