I would group the clientConfig and the the mapConfig.

    NearCacheConfig cashConfig = new NearCacheConfig();
    cashConfig.setInMemoryFormat(InMemoryFormat.OBJECT);

    final ClientConfig clientConfig = new ClientConfig();
    clientConfig.getNetworkConfig().setSmartRouting(false);
    clientConfig.addNearCacheConfig(mapName, cashConfig);

By grouping it you see better what is going on. Else it is scattered which is bad. Also it isn't cashConfig but probably cacheConfig.