Skip to content

Instantly share code, notes, and snippets.

@slaskawi
Created February 24, 2017 12:28
Show Gist options
  • Select an option

  • Save slaskawi/8d5c56d023bd8eec91103b9cd6511ae2 to your computer and use it in GitHub Desktop.

Select an option

Save slaskawi/8d5c56d023bd8eec91103b9cd6511ae2 to your computer and use it in GitHub Desktop.
embeddedCacheManager
.getHealth()
.getClusterHealth()
.getNumberOfNodes() // Those two methods allow to control if
.getNodeNames() // proper number of nodes joined the cluster
.getClusterName() // Might be helpful for managing multiple clusters
.getHealthStatus() // UNHEALTHY, HEALTHY, REBALANCING
.getHostInfo()
.getNumberOfCpus() // Those 3 methods might be
.getTotalMemoryKb() // useful for dynamic Cloud
.getFreeMemoryInKb() // environments
getCacheHealth()
.get(0).getStatus() // UNHEALTHY, HEALTHY, REBALANCING
.get(0).getCacheName() // Cache name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment