static < K , V > CacheConfig < K , V > createCacheConfig ( HazelcastClientInstanceImpl client , CacheConfig < K , V > newCacheConfig ) { try { String nameWithPrefix = newCacheConfig . getNameWithPrefix ( ) ; int partitionId = client . getClientPartitionService ( ) . getPartitionId ( nameWithPrefix ) ; Object resolvedConfig = resolveCacheConfigWithRetry ( client , newCacheConfig , partitionId ) ; Data configData = client . getSerializationService ( ) . toData ( resolvedConfig ) ; ClientMessage request = CacheCreateConfigCodec . encodeRequest ( configData , true ) ; ClientInvocation clientInvocation = new ClientInvocation ( client , request , nameWithPrefix , partitionId ) ; Future < ClientMessage > future = clientInvocation . invoke ( ) ; final ClientMessage response = future . get ( ) ; final Data data = CacheCreateConfigCodec . decodeResponse ( response ) . response ; return resolveCacheConfig ( client , clientInvocation , data ) ; } catch ( Exception e ) { throw rethrow ( e ) ; } }
Creates a new cache configuration on Hazelcast members .