<%@ page import="com.tangosol.net.*, java.util.Iterator"%>
<%@ page import="java.util.Enumeration"%>

<h1>Cluster</h1>

<ul>

<%
Cluster cluster    = CacheFactory.getCluster();
Member  memberThis = cluster.getLocalMember();

for (Iterator iter = cluster.getMemberSet().iterator(); iter.hasNext(); )
    {
    Member member = (Member) iter.next();
    %>
    <li><%= member %> <% if (member.equals(memberThis)) { %><span style="color: #c00;">this node</span><% } %></li>
    <%
    }
%>
</ul>

<h1>Cache Service</h1>
<%
    CacheService service = CacheFactory.getReplicatedCacheService("ReplicatedCache");
%>

Caches:

<ul>
    <%
        Enumeration cacheNames = service.getCacheNames();
        while (cacheNames.hasMoreElements())
        {
            String cacheName = (String)cacheNames.nextElement();
            NamedCache cache = CacheFactory.getCache(cacheName);
        %>
        <li><%= cacheName %> - <%= cache.size() %></li>
        <%
        }
    %>
</ul>