[
https://issues.jboss.org/browse/ARQ-513?page=com.atlassian.jira.plugin.sy...
]
Martin Gencur commented on ARQ-513:
-----------------------------------
The API will look like this:
{code:java}
@Infinispan("container1") //name "container1" corresponds to a
container name defined by <container qualifier="container1"> inside
arquillian.xml
InfinispanInfo info //or it can be injected into a method parameter
...
...
info.getMemcachedEndpoint().getPort());
info.getMemcachedEndpoint().getInetAddress());
info.getHotrodEndpoint().getPort());
info.getHotrodEndpoint().getInetAddress());
info.getRESTEndpoint().getInetAddress()); //only for Infinispan in JBossAS7+ (EDG)
info.getRESTEndpoint().getContextPath()); //only for Infinispan in JBossAS7+ (EDG)
...
// retrieving cache manager properties like cluster members, cluster size, ...
info.getCacheManager("cacheManagerName").getCreatedCacheCount();
info.getDefaultCacheManager().getCacheManagerStatus());
...
//retrieving properties and statistics like hits, stores, elapsed time, ...
info.getCacheManager("default").getCache("namedCache").getMisses();
...
//semi-generic approach for retrieving cache statistics
info.getDefaultCacheManager().getDefaultCache().getStatistics(CacheStatistics.AVERAGE_READ_TIME)
{code}
Implement injectable Infinispan server descriptor for querying
information about server
---------------------------------------------------------------------------------------
Key: ARQ-513
URL:
https://issues.jboss.org/browse/ARQ-513
Project: Arquillian
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Infinispan Containers
Reporter: Martin Gencur
Assignee: Martin Gencur
It should be possible to inject an Infinispan server descriptor through which one can get
information about hostnames, port numbers and various statistics around individual caches
running in those servers.
Example use:
@Infinispan(container="container1")
InfinispanInfo inf1;
...
inf1.getInstalledEndpoints() [hostname+port couples]
inf1.getDefaultCacheManager().getStatistics()
inf1.getCache("cache_name").getStatistics()
inf1.getCache("cache_name").getStatistics(CacheStatistics.EVICTIONS)
...
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira