class MapHandler<VALUE, REPLY> extends AbstractHandler<MapHandler<VALUE, REPLY>> {
    protected MapService<VALUE, REPLY> mapService;
    private String mapName;

    protected MapHandler(String mapName) {
        this.mapName = mapName;
    }

    public static <V, O> MapHandler<V, O> createMapHandler(String mapName, MapService<V, O> mapService) {<FILL_FUNCTION_BODY>}

    @Override
    public void run(ChronicleContext context, ChronicleChannel channel) {
        try (ChronicleMap<Bytes<?>, VALUE> map = MapChannel.createMap(mapName, mapService, context)) {
            REPLY REPLY = channel.methodWriter(mapService().replyClass());
            mapService.map(map);
            mapService.reply(REPLY);
            try (AffinityLock lock = context.affinityLock()) {
                channel.eventHandlerAsRunnable(mapService).run();
            }

        } catch (IOException ioe) {
            throw Jvm.rethrow(ioe);
        }
    }

    @Override
    public ChronicleChannel asInternalChannel(ChronicleContext context, ChronicleChannelCfg channelCfg) {
        return new MapChannel(mapName, mapService, context, channelCfg);
    }

    protected MapService<VALUE, REPLY> mapService() {
        return mapService;
    }
}

        MapHandler<V, O> mh = new MapHandler<>(mapName);
        mh.mapService = mapService;
        return mh;
    
<methods>public void <init>() ,public java.lang.Boolean buffered() ,public MapHandler<VALUE,REPLY> buffered(java.lang.Boolean) <variables>private java.lang.Boolean buffered