Package org.infinispan.remoting.transport.jgroups

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport$NotifyMerge


      private CoreGroupCommunicationService service;
      private Set<String> caches = new HashSet<String>();
     
      LockManagerEntry(Cache<?, ?> cache)
      {
         JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
         Channel channel = transport.getChannel();
        
         this.service = new CoreGroupCommunicationService();
         this.service.setChannel(channel);
         this.service.setScopeId(SCOPE_ID);
        
View Full Code Here


   @Override
   public Channel getChannel()
   {
      if (this.cache == null) return null;
     
      JGroupsTransport transport = (JGroupsTransport) this.cache.getAdvancedCache().getRpcManager().getTransport();
     
      return transport.getChannel();
   }
View Full Code Here

      addClusterEnabledCacheManager(configuration);
   }

   private void injectListeningHandler(CacheContainer ecm, ListeningHandler lh) {
      replaceComponent(ecm, InboundInvocationHandler.class, lh, true);
      JGroupsTransport t = (JGroupsTransport) extractComponent(cache(0), Transport.class);
      CommandAwareRpcDispatcher card = t.getCommandAwareRpcDispatcher();
      replaceField(lh, "inboundInvocationHandler", card, CommandAwareRpcDispatcher.class);
   }
View Full Code Here

      cacheConfigBuilder.locking().supportsConcurrentUpdates(supportsConcurrentUpdates);
      cacheConfigBuilder.clustering().stateTransfer().fetchInMemoryState(true).awaitInitialTransfer(false);

      transportGate = new ReclosableLatch(true);
      GlobalConfigurationBuilder globalConfigurationBuilder = new GlobalConfigurationBuilder();
      globalConfigurationBuilder.transport().transport(new JGroupsTransport() {
         @Override
         public Map<Address, Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout,
                                                      boolean usePriorityQueue, ResponseFilter responseFilter) throws Exception {
            if (rpcCommand instanceof CacheTopologyControlCommand) {
               try {
View Full Code Here

   }

   public void testInvokeAndExceptionWhileUnmarshalling() throws Exception {
      Cache cache1 = cache(0, "replSync");
      Cache cache2 = cache(1, "replSync");
      JGroupsTransport transport1 = (JGroupsTransport) TestingUtil.extractComponent(cache1, Transport.class);
      CommandAwareRpcDispatcher dispatcher1 = transport1.getCommandAwareRpcDispatcher();
      RpcDispatcher.Marshaller originalMarshaller1 = dispatcher1.getMarshaller();
      JGroupsTransport transport2 = (JGroupsTransport) TestingUtil.extractComponent(cache2, Transport.class);
      CommandAwareRpcDispatcher dispatcher2 = transport2.getCommandAwareRpcDispatcher();
      RpcDispatcher.Marshaller originalMarshaller = dispatcher2.getMarshaller();
      try {
         RpcDispatcher.Marshaller mockMarshaller1 = mock(RpcDispatcher.Marshaller.class);
         RpcDispatcher.Marshaller mockMarshaller = mock(RpcDispatcher.Marshaller.class);
         PutKeyValueCommand putCommand = new PutKeyValueCommand();
View Full Code Here

      }
      return values;
   }

   public static DISCARD getDiscardForCache(Cache<?, ?> c) throws Exception {
      JGroupsTransport jgt = (JGroupsTransport) TestingUtil.extractComponent(c, Transport.class);
      Channel ch = jgt.getChannel();
      ProtocolStack ps = ch.getProtocolStack();
      DISCARD discard = new DISCARD();
      ps.insertProtocol(discard, ProtocolStack.ABOVE, TP.class);
      return discard;
   }
View Full Code Here

    * @param out_delay_millis
    * @return a reference to the DELAY instance being used by the JGroups stack
    * @throws Exception
    */
   public static DELAY setDelayForCache(Cache<?, ?> cache, int in_delay_millis, int out_delay_millis) throws Exception {
      JGroupsTransport jgt = (JGroupsTransport) TestingUtil.extractComponent(cache, Transport.class);
      Channel ch = jgt.getChannel();
      ProtocolStack ps = ch.getProtocolStack();
      DELAY delay = new DELAY();
      delay.setInDelay(in_delay_millis);
      delay.setOutDelay(out_delay_millis);
      ps.insertProtocol(delay, ProtocolStack.ABOVE, TP.class);
View Full Code Here

      assertNotNull(po);
      Address primaryLocation = getCacheManager("1").getCache(BasicCacheContainer.DEFAULT_CACHE_NAME).getAdvancedCache().getDistributionManager().getPrimaryLocation("testExtendedHeaders");
      assertEquals(primaryLocation.toString(), po.getValue());
      Header sa = get.getResponseHeader("Cluster-Server-Address");
      assertNotNull(sa);
      JGroupsTransport transport = (JGroupsTransport)getCacheManager("2").getTransport();
      assertEquals(transport.getPhysicalAddresses().toString(), sa.getValue());
      Header nn = get.getResponseHeader("Cluster-Node-Name");
      assertNotNull(nn);
      assertEquals(transport.getAddress().toString(), nn.getValue());
      get.releaseConnection();
   }
View Full Code Here

    public static EmbeddedCacheManager createCacheContainer(boolean local, String passivationDir, boolean totalReplication, boolean purgeCacheLoader) throws Exception {
        CacheMode mode = local ? CacheMode.LOCAL : (totalReplication ? CacheMode.REPL_SYNC : CacheMode.DIST_SYNC);
        GlobalConfigurationBuilder globalBuilder = new GlobalConfigurationBuilder();
        String name = "container" + containerIndex++;
        globalBuilder.transport()
                .transport(local ? null : new JGroupsTransport())
                .addProperty(JGroupsTransport.CHANNEL_LOOKUP, ChannelLookup.class.getName())
                .distributedSyncTimeout(60000)
                .clusterName("test")
                .globalJmxStatistics().enable().cacheManagerName(name).allowDuplicateDomains(true)
        ;
View Full Code Here

   /**
    * Simulates a node crash, discarding all the messages from/to this node and then stopping the caches.
    */
   private static void crashCacheManagers(EmbeddedCacheManager... cacheManagers) {
      for (EmbeddedCacheManager cm : cacheManagers) {
         JGroupsTransport t = (JGroupsTransport) cm.getGlobalComponentRegistry().getComponent(Transport.class);
         Channel channel = t.getChannel();
         try {
            DISCARD discard = new DISCARD();
            discard.setDiscardAll(true);
            channel.getProtocolStack().insertProtocol(discard, ProtocolStack.ABOVE, TP.class);
         } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.infinispan.remoting.transport.jgroups.JGroupsTransport$NotifyMerge

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.