/** * @return Whether terracotta clustering is being used and rejoin is enabled */ public boolean isTerracottaRejoin() { TerracottaClientConfiguration terracottaConfiguration = getTerracottaConfiguration(); return terracottaConfiguration != null && terracottaConfiguration.isRejoin(); }
private boolean isRejoinEnabled() { return terracottaClientConfiguration != null && terracottaClientConfiguration.isRejoin(); }
private static Toolkit createTerracottaToolkit(TerracottaClientConfiguration terracottaClientConfiguration, String productId, ClassLoader loader) { TerracottaToolkitBuilder terracottaClientBuilder = new TerracottaToolkitBuilder(); EhcacheTcConfig ehcacheTcConfig = EhcacheTcConfig.create(terracottaClientConfiguration); switch (ehcacheTcConfig.type) { case URL: terracottaClientBuilder.setTCConfigUrl(ehcacheTcConfig.tcConfigUrlOrSnippet); break; case EMBEDDED_TC_CONFIG: case FILE: terracottaClientBuilder.setTCConfigSnippet(ehcacheTcConfig.tcConfigUrlOrSnippet); break; } terracottaClientBuilder.addTunnelledMBeanDomain("net.sf.ehcache"); terracottaClientBuilder.addTunnelledMBeanDomain("net.sf.ehcache.hibernate"); terracottaClientBuilder.addTunnelledMBeanDomain("org.terracotta.wan"); terracottaClientBuilder.setRejoinEnabled(terracottaClientConfiguration.isRejoin()); terracottaClientBuilder.setProductId(productId); terracottaClientBuilder.setClassLoader(loader); return terracottaClientBuilder.buildToolkit(); }
private void init() { if (tcConfigConfiguration == null) { return; } if (tcConfigConfiguration.getUrl() != null) { addAttribute(new SimpleNodeAttribute("url", tcConfigConfiguration.getUrl()).optional(true)); } addAttribute(new SimpleNodeAttribute("rejoin", tcConfigConfiguration.isRejoin()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_REJOIN_VALUE)); addAttribute(new SimpleNodeAttribute("wanEnabledTSA", tcConfigConfiguration.isWanEnabledTSA()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_WAN_ENABLED_TSA_VALUE)); if (tcConfigConfiguration.getOriginalEmbeddedConfig() != null) { addChildElement(new TCConfigElement(this, tcConfigConfiguration.getOriginalEmbeddedConfig())); } }
/** * @return Whether terracotta clustering is being used and rejoin is enabled */ public boolean isTerracottaRejoin() { TerracottaClientConfiguration terracottaConfiguration = getTerracottaConfiguration(); return terracottaConfiguration != null && terracottaConfiguration.isRejoin(); }
/** * @return Whether terracotta clustering is being used and rejoin is enabled */ public boolean isTerracottaRejoin() { TerracottaClientConfiguration terracottaConfiguration = getTerracottaConfiguration(); return terracottaConfiguration != null && terracottaConfiguration.isRejoin(); }
/** * @return Whether terracotta clustering is being used and rejoin is enabled */ public boolean isTerracottaRejoin() { TerracottaClientConfiguration terracottaConfiguration = getTerracottaConfiguration(); return terracottaConfiguration != null && terracottaConfiguration.isRejoin(); }
private void validateTerracottaConfig(final Configuration configuration, final Collection<ConfigError> errors) { final TerracottaClientConfiguration clientConfiguration = configuration.getTerracottaConfiguration(); if (clientConfiguration != null && clientConfiguration.isRejoin() && !getTerracottaConfiguration().isNonstopEnabled()) { errors.add(new CacheConfigError("Terracotta clustered caches must be nonstop when rejoin is enabled.", getName())); } }
private void init() { if (tcConfigConfiguration == null) { return; } if (tcConfigConfiguration.getUrl() != null) { addAttribute(new SimpleNodeAttribute("url", tcConfigConfiguration.getUrl()).optional(true)); } addAttribute(new SimpleNodeAttribute("rejoin", tcConfigConfiguration.isRejoin()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_REJOIN_VALUE)); if (tcConfigConfiguration.getOriginalEmbeddedConfig() != null) { addChildElement(new TCConfigElement(this, tcConfigConfiguration.getOriginalEmbeddedConfig())); } }
private void init() { if (tcConfigConfiguration == null) { return; } if (tcConfigConfiguration.getUrl() != null) { addAttribute(new SimpleNodeAttribute("url", tcConfigConfiguration.getUrl()).optional(true)); } addAttribute(new SimpleNodeAttribute("rejoin", tcConfigConfiguration.isRejoin()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_REJOIN_VALUE)); addAttribute(new SimpleNodeAttribute("wanEnabledTSA", tcConfigConfiguration.isWanEnabledTSA()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_WAN_ENABLED_TSA_VALUE)); if (tcConfigConfiguration.getOriginalEmbeddedConfig() != null) { addChildElement(new TCConfigElement(this, tcConfigConfiguration.getOriginalEmbeddedConfig())); } }
private void init() { if (tcConfigConfiguration == null) { return; } if (tcConfigConfiguration.getUrl() != null) { addAttribute(new SimpleNodeAttribute("url", tcConfigConfiguration.getUrl()).optional(true)); } addAttribute(new SimpleNodeAttribute("rejoin", tcConfigConfiguration.isRejoin()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_REJOIN_VALUE)); addAttribute(new SimpleNodeAttribute("wanEnabledTSA", tcConfigConfiguration.isWanEnabledTSA()).optional(true).defaultValue( TerracottaClientConfiguration.DEFAULT_WAN_ENABLED_TSA_VALUE)); if (tcConfigConfiguration.getOriginalEmbeddedConfig() != null) { addChildElement(new TCConfigElement(this, tcConfigConfiguration.getOriginalEmbeddedConfig())); } }