public MapConfig buildMapConfig(final BaseHazelcastProperties hz, final String mapName, final long timeoutSeconds) {
        val cluster = hz.getCluster();
        val evictionPolicy = EvictionPolicy.valueOf(cluster.getEvictionPolicy());

        LOGGER.trace("Creating Hazelcast map configuration for [{}] with idle timeoutSeconds [{}] second(s)", mapName, timeoutSeconds);
        val maxSizeConfig = new MaxSizeConfig()
            .setMaxSizePolicy(MaxSizeConfig.MaxSizePolicy.valueOf(cluster.getMaxSizePolicy()))
            .setSize(cluster.getMaxHeapSizePercentage());

        val mergePolicyConfig = new MergePolicyConfig();
        if (StringUtils.hasText(cluster.getMapMergePolicy())) {
            mergePolicyConfig.setPolicy(cluster.getMapMergePolicy());
        }

        return new MapConfig()
            .setName(mapName)
            .setMergePolicyConfig(mergePolicyConfig)
            .setMaxIdleSeconds((int) timeoutSeconds)
            .setBackupCount(cluster.getBackupCount())
            .setAsyncBackupCount(cluster.getAsyncBackupCount())
            .setEvictionPolicy(evictionPolicy)
            .setMaxSizeConfig(maxSizeConfig);
    }
public MapConfig buildMapConfig ( final BaseHazelcastProperties hz , final String mapName , final long timeoutSeconds ) { val cluster = hz . getCluster ( ) ; val evictionPolicy = EvictionPolicy . valueOf ( cluster . getEvictionPolicy ( ) ) ; LOGGER . trace ( "Creating Hazelcast map configuration for [{}] with idle timeoutSeconds [{}] second(s)" , mapName , timeoutSeconds ) ; val maxSizeConfig = new MaxSizeConfig ( ) . setMaxSizePolicy ( MaxSizeConfig . MaxSizePolicy . valueOf ( cluster . getMaxSizePolicy ( ) ) ) . setSize ( cluster . getMaxHeapSizePercentage ( ) ) ; val mergePolicyConfig = new MergePolicyConfig ( ) ; if ( StringUtils . hasText ( cluster . getMapMergePolicy ( ) ) ) { mergePolicyConfig . setPolicy ( cluster . getMapMergePolicy ( ) ) ; } return new MapConfig ( ) . setName ( mapName ) . setMergePolicyConfig ( mergePolicyConfig ) . setMaxIdleSeconds ( ( int ) timeoutSeconds ) . setBackupCount ( cluster . getBackupCount ( ) ) . setAsyncBackupCount ( cluster . getAsyncBackupCount ( ) ) . setEvictionPolicy ( evictionPolicy ) . setMaxSizeConfig ( maxSizeConfig ) ; }
Build map config map config.

@param hz             the hz
@param mapName        the storage name
@param timeoutSeconds the timeoutSeconds
@return the map config