/** * Returns the name of this cache container. * @return the cache container name */ default String getName() { return this.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(); }
@Override public int hashCode() { return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().hashCode() ^ this.cache.getName().hashCode(); }
@Override public boolean equals(Object object) { if ((object == null) || !(object instanceof InfinispanXAResourceRecovery)) return false; InfinispanXAResourceRecovery recovery = (InfinispanXAResourceRecovery) object; return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().equals(recovery.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName()) && this.cache.getName().equals(recovery.cache.getName()); }
@Override protected void initChannel() { try { this.channel = this.factory.createChannel(this.configuration.globalJmxStatistics().cacheManagerName()); this.channel.setDiscardOwnMessages(false); } catch (Exception e) { throw new CacheException(e); } } }
@Override public String toString() { return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName() + "." + this.cache.getName(); } }
ClusteringServerLogger.ROOT_LOGGER.registryListenerFailed(e, this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(), this.cache.getName(), type, entries);
@CacheEntryCreated @CacheEntryModified public void modified(CacheEntryEvent<T, Set<Address>> event) { if (event.isPre()) return; Map.Entry<Listener, ExecutorService> entry = this.listeners.get(event.getKey()); if (entry != null) { Listener listener = entry.getKey(); if (listener != null) { ExecutorService executor = entry.getValue(); Set<Node> members = new TreeSet<>(); for (Address address : event.getValue()) { members.add(this.group.createNode(address)); } try { executor.submit(() -> { try { listener.providersChanged(members); } catch (Throwable e) { ClusteringServerLogger.ROOT_LOGGER.serviceProviderRegistrationListenerFailed(e, this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(), this.cache.getName(), members); } }); } catch (RejectedExecutionException e) { // Executor was shutdown } } } } }
@Override public String getName() { GlobalConfiguration global = this.cache.getCacheManager().getCacheManagerConfiguration(); TransportConfiguration transport = global.transport(); return transport.transport() != null ? transport.clusterName() : global.globalJmxStatistics().cacheManagerName(); }
@Override public int hashCode() { return this.container.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().hashCode() ^ this.cacheName.hashCode(); }
@Override public boolean equals(Object object) { if ((object == null) || !(object instanceof InfinispanXAResourceRecovery)) return false; InfinispanXAResourceRecovery recovery = (InfinispanXAResourceRecovery) object; return this.container.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().equals(recovery.container.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName()) && this.cacheName.equals(recovery.cacheName); }
@Override public String toString() { return container.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName() + "." + this.cacheName; } }
/** * Returns the name of this cache container. * @return the cache container name */ default String getName() { return this.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(); }
/** * {@inheritDoc} * @see java.lang.Object#toString() */ @Override public String toString() { return this.cm.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(); }
@Override public int hashCode() { return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().hashCode() ^ this.cache.getName().hashCode(); }
@Override public boolean equals(Object object) { if ((object == null) || !(object instanceof InfinispanXAResourceRecovery)) return false; InfinispanXAResourceRecovery recovery = (InfinispanXAResourceRecovery) object; return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName().equals(recovery.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName()) && this.cache.getName().equals(recovery.cache.getName()); }
@Override protected void initChannel() { try { this.channel = this.factory.createChannel(this.configuration.globalJmxStatistics().cacheManagerName()); this.channel.setDiscardOwnMessages(false); } catch (Exception e) { throw new CacheException(e); } } }
@Override public String toString() { return this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName() + "." + this.cache.getName(); } }
@Override public String getName() { GlobalConfiguration global = this.cache.getCacheManager().getCacheManagerConfiguration(); TransportConfiguration transport = global.transport(); return transport.transport() != null ? transport.clusterName() : global.globalJmxStatistics().cacheManagerName(); }
private ObjectName getQueryStatsObjectName(String jmxDomain, String cacheName) { String cacheManagerName = cacheManager.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(); try { return new ObjectName(jmxDomain + ":type=Query,manager=" + ObjectName.quote(cacheManagerName) + ",cache=" + ObjectName.quote(cacheName) + ",component=Statistics"); } catch (MalformedObjectNameException e) { throw new CacheException("Malformed object name", e); } } }
@Override protected void rebuildIndexes() throws Exception { String cacheManagerName = manager(0).getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(); ObjectName massIndexerObjName = getMassIndexerObjectName( BASE_JMX_DOMAIN + 0, cacheManagerName, manager(0).getCacheManagerConfiguration().defaultCacheName().get()); server.invoke(massIndexerObjName, "start", new Object[0], new String[0]); }