public static HotRestartConfig decode(ClientMessage clientMessage) { boolean enabled = clientMessage.getBoolean(); boolean fsync = clientMessage.getBoolean(); HotRestartConfig config = new HotRestartConfig(); config.setEnabled(enabled); config.setFsync(fsync); return config; }
@Override @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) public final int hashCode() { int result = name.hashCode(); result = 31 * result + (keyType != null ? keyType.hashCode() : 0); result = 31 * result + (valueType != null ? valueType.hashCode() : 0); result = 31 * result + (statisticsEnabled ? 1 : 0); result = 31 * result + (managementEnabled ? 1 : 0); result = 31 * result + (readThrough ? 1 : 0); result = 31 * result + (writeThrough ? 1 : 0); result = 31 * result + (cacheLoaderFactory != null ? cacheLoaderFactory.hashCode() : 0); result = 31 * result + (cacheWriterFactory != null ? cacheWriterFactory.hashCode() : 0); result = 31 * result + (cacheLoader != null ? cacheLoader.hashCode() : 0); result = 31 * result + (cacheWriter != null ? cacheWriter.hashCode() : 0); result = 31 * result + (expiryPolicyFactoryConfig != null ? expiryPolicyFactoryConfig.hashCode() : 0); result = 31 * result + (cacheEntryListeners != null ? cacheEntryListeners.hashCode() : 0); result = 31 * result + asyncBackupCount; result = 31 * result + backupCount; result = 31 * result + (inMemoryFormat != null ? inMemoryFormat.hashCode() : 0); result = 31 * result + (evictionConfig != null ? evictionConfig.hashCode() : 0); result = 31 * result + (wanReplicationRef != null ? wanReplicationRef.hashCode() : 0); result = 31 * result + (quorumName != null ? quorumName.hashCode() : 0); result = 31 * result + (partitionLostListenerConfigs != null ? partitionLostListenerConfigs.hashCode() : 0); result = 31 * result + (mergePolicy != null ? mergePolicy.hashCode() : 0); result = 31 * result + (hotRestartConfig != null ? hotRestartConfig.hashCode() : 0); result = 31 * result + (disablePerEntryInvalidationEvents ? 1 : 0); return result; }
isManagementEnabled = in.readBoolean(); isStatisticsEnabled = in.readBoolean(); hotRestartConfig.setEnabled(in.readBoolean()); hotRestartConfig.setFsync(in.readBoolean());
@Override public IdentifiedDataSerializable createNew(Integer arg) { return new HotRestartConfig(); } };
private static Cache<Integer, String> createCache(HazelcastInstance instance) { CachingProvider cachingProvider = HazelcastServerCachingProvider .createCachingProvider(instance); CacheConfig<Integer, String> cacheConfig = new CacheConfig<Integer, String>("cache"); cacheConfig.getHotRestartConfig().setEnabled(true); return cachingProvider.getCacheManager().createCache("cache", cacheConfig); } }
return false; return hotRestartConfig != null ? hotRestartConfig.equals(that.hotRestartConfig) : that.hotRestartConfig == null;
isManagementEnabled = in.readBoolean(); isStatisticsEnabled = in.readBoolean(); hotRestartConfig.setEnabled(in.readBoolean()); hotRestartConfig.setFsync(in.readBoolean());
@Override public IdentifiedDataSerializable createNew(Integer arg) { return new HotRestartConfig(); } };
private static Cache<Integer, String> createCache(HazelcastInstance instance) { CachingProvider cachingProvider = HazelcastServerCachingProvider .createCachingProvider(instance); CacheConfig<Integer, String> cacheConfig = new CacheConfig<Integer, String>("cache"); cacheConfig.getHotRestartConfig().setEnabled(true); return cachingProvider.getCacheManager().createCache("cache", cacheConfig); } }
return false; return hotRestartConfig != null ? hotRestartConfig.equals(that.hotRestartConfig) : that.hotRestartConfig == null;
public static HotRestartConfig decode(ClientMessage clientMessage) { boolean enabled = clientMessage.getBoolean(); boolean fsync = clientMessage.getBoolean(); HotRestartConfig config = new HotRestartConfig(); config.setEnabled(enabled); config.setFsync(fsync); return config; }
config.setManagementEnabled(in.readBoolean()); config.setStatisticsEnabled(in.readBoolean()); config.getHotRestartConfig().setEnabled(in.readBoolean()); config.getHotRestartConfig().setFsync(in.readBoolean());
@SuppressWarnings("checkstyle:executablestatementcount") public CacheSimpleConfig(CacheSimpleConfig cacheSimpleConfig) { this.name = cacheSimpleConfig.name; this.keyType = cacheSimpleConfig.keyType; this.valueType = cacheSimpleConfig.valueType; this.statisticsEnabled = cacheSimpleConfig.statisticsEnabled; this.managementEnabled = cacheSimpleConfig.managementEnabled; this.readThrough = cacheSimpleConfig.readThrough; this.writeThrough = cacheSimpleConfig.writeThrough; this.cacheLoaderFactory = cacheSimpleConfig.cacheLoaderFactory; this.cacheWriterFactory = cacheSimpleConfig.cacheWriterFactory; this.expiryPolicyFactoryConfig = cacheSimpleConfig.expiryPolicyFactoryConfig; this.cacheEntryListeners = cacheSimpleConfig.cacheEntryListeners; this.asyncBackupCount = cacheSimpleConfig.asyncBackupCount; this.backupCount = cacheSimpleConfig.backupCount; this.inMemoryFormat = cacheSimpleConfig.inMemoryFormat; // eviction config cannot be null if (cacheSimpleConfig.evictionConfig != null) { this.evictionConfig = cacheSimpleConfig.evictionConfig; } this.wanReplicationRef = cacheSimpleConfig.wanReplicationRef; this.partitionLostListenerConfigs = new ArrayList<CachePartitionLostListenerConfig>(cacheSimpleConfig.getPartitionLostListenerConfigs()); this.quorumName = cacheSimpleConfig.quorumName; this.mergePolicy = cacheSimpleConfig.mergePolicy; this.hotRestartConfig = new HotRestartConfig(cacheSimpleConfig.hotRestartConfig); this.disablePerEntryInvalidationEvents = cacheSimpleConfig.disablePerEntryInvalidationEvents; }
private static Cache<Integer, String> createCache(HazelcastInstance instance) { CachingProvider cachingProvider = HazelcastServerCachingProvider .createCachingProvider(instance); CacheConfig<Integer, String> cacheConfig = new CacheConfig<Integer, String>("cache"); cacheConfig.getHotRestartConfig().setEnabled(true); return cachingProvider.getCacheManager().createCache("cache", cacheConfig); } }
@Override @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) public final int hashCode() { int result = name.hashCode(); result = 31 * result + (keyType != null ? keyType.hashCode() : 0); result = 31 * result + (valueType != null ? valueType.hashCode() : 0); result = 31 * result + (statisticsEnabled ? 1 : 0); result = 31 * result + (managementEnabled ? 1 : 0); result = 31 * result + (readThrough ? 1 : 0); result = 31 * result + (writeThrough ? 1 : 0); result = 31 * result + (cacheLoaderFactory != null ? cacheLoaderFactory.hashCode() : 0); result = 31 * result + (cacheWriterFactory != null ? cacheWriterFactory.hashCode() : 0); result = 31 * result + (cacheLoader != null ? cacheLoader.hashCode() : 0); result = 31 * result + (cacheWriter != null ? cacheWriter.hashCode() : 0); result = 31 * result + (expiryPolicyFactoryConfig != null ? expiryPolicyFactoryConfig.hashCode() : 0); result = 31 * result + (cacheEntryListeners != null ? cacheEntryListeners.hashCode() : 0); result = 31 * result + asyncBackupCount; result = 31 * result + backupCount; result = 31 * result + (inMemoryFormat != null ? inMemoryFormat.hashCode() : 0); result = 31 * result + (evictionConfig != null ? evictionConfig.hashCode() : 0); result = 31 * result + (wanReplicationRef != null ? wanReplicationRef.hashCode() : 0); result = 31 * result + (quorumName != null ? quorumName.hashCode() : 0); result = 31 * result + (partitionLostListenerConfigs != null ? partitionLostListenerConfigs.hashCode() : 0); result = 31 * result + (mergePolicy != null ? mergePolicy.hashCode() : 0); result = 31 * result + (hotRestartConfig != null ? hotRestartConfig.hashCode() : 0); result = 31 * result + (disablePerEntryInvalidationEvents ? 1 : 0); return result; }
return false; return hotRestartConfig != null ? hotRestartConfig.equals(that.hotRestartConfig) : that.hotRestartConfig == null;
public static HotRestartConfig decode(ClientMessage clientMessage) { boolean enabled = clientMessage.getBoolean(); boolean fsync = clientMessage.getBoolean(); HotRestartConfig config = new HotRestartConfig(); config.setEnabled(enabled); config.setFsync(fsync); return config; }