Search in sources :

Example 1 with LegacyCacheConfig

use of com.hazelcast.config.LegacyCacheConfig in project hazelcast by hazelcast.

the class CacheCreateConfigMessageTask method extractCacheConfigFromMessage.

private CacheConfig extractCacheConfigFromMessage() {
    int clientVersion = getClientVersion();
    CacheConfig cacheConfig = null;
    if (BuildInfo.UNKNOWN_HAZELCAST_VERSION == clientVersion) {
        boolean compatibilityEnabled = nodeEngine.getProperties().getBoolean(GroupProperty.COMPATIBILITY_3_6_CLIENT_ENABLED);
        if (compatibilityEnabled) {
            LegacyCacheConfig legacyCacheConfig = nodeEngine.toObject(parameters.cacheConfig, LegacyCacheConfig.class);
            if (null == legacyCacheConfig) {
                return null;
            }
            return legacyCacheConfig.getConfigAndReset();
        }
    }
    return (CacheConfig) nodeEngine.toObject(parameters.cacheConfig);
}
Also used : LegacyCacheConfig(com.hazelcast.config.LegacyCacheConfig) LegacyCacheConfig(com.hazelcast.config.LegacyCacheConfig) CacheConfig(com.hazelcast.config.CacheConfig)

Aggregations

CacheConfig (com.hazelcast.config.CacheConfig)1 LegacyCacheConfig (com.hazelcast.config.LegacyCacheConfig)1