Package com.dotcms.repackage.org.jgroups

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


    @Produces ("application/json")
    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());
View Full Code Here

TOP

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

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.