Package com.dotcms.repackage.org.jgroups

Examples of com.dotcms.repackage.org.jgroups.JChannel


      if(channel!=null) {
          channel.disconnect();
      }
     
      channel = new JChannel(classLoader.getResource(cacheFile));
      channel.setReceiver(this);
     
      channel.connect(Config.getStringProperty("CACHE_JGROUPS_GROUP_NAME","dotCMSCluster"));
      channel.setOpt(JChannel.LOCAL, false);
      useJgroups = true;
View Full Code Here


        }else{
          Logger.info(this, "Not Setting up any Properties as no protocal was found");
        }
        System.setProperty("java.net.preferIPv4Stack", Config.getStringProperty("CACHE_FORCE_IPV4", "true"));
        Logger.info(this, "Setting up JCannel");
        channel = new JChannel(classLoader.getResource(cacheFile));
        channel.setReceiver(this);
        channel.connect("dotCMSCluster");
        channel.setOpt(JChannel.LOCAL, false);
        useJgroups = true;
        Logger.info(this,channel.toString(true));
View Full Code Here

    public Response getCacheClusterStatus ( @Context HttpServletRequest request, @PathParam ("params") String params ) throws DotStateException, DotDataException, DotSecurityException, JSONException {

        InitDataObject initData = init( params, true, request, false, "9" );
        ResourceResponse responseResource = new ResourceResponse( initData.getParamsMap() );
        View view = ((DotGuavaCacheAdministratorImpl)CacheLocator.getCacheAdministrator().getImplementationObject()).getView();
        JChannel channel = ((DotGuavaCacheAdministratorImpl)CacheLocator.getCacheAdministrator().getImplementationObject()).getChannel();
        JSONObject jsonClusterStatusObject = new JSONObject();

        if(view!=null) {
          List<Address> members = view.getMembers();
          jsonClusterStatusObject.put( "clusterName", channel.getClusterName());
          jsonClusterStatusObject.put( "open", channel.isOpen());
          jsonClusterStatusObject.put( "numberOfNodes", members.size());
          jsonClusterStatusObject.put( "address", channel.getAddressAsString());
          jsonClusterStatusObject.put( "receivedBytes", channel.getReceivedBytes());
          jsonClusterStatusObject.put( "receivedMessages", channel.getReceivedMessages());
          jsonClusterStatusObject.put( "sentBytes", channel.getSentBytes());
          jsonClusterStatusObject.put( "sentMessages", channel.getSentMessages());
        }


        return responseResource.response( jsonClusterStatusObject.toString() );
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.jgroups.JChannel

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.