All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.up.uca.job.store.CodeStore Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.job.store;

import io.vertx.up.atom.worker.Mission;
import io.vertx.up.fn.Fn;
import io.vertx.up.runtime.ZeroAnno;

import java.util.Set;

/**
 * Bridge for different JobStore
 */
class CodeStore implements JobReader {
    private static final Set MISSIONS = ZeroAnno.getJobs();

    @Override
    public Set fetch() {
        return MISSIONS;
    }

    @Override
    public Mission fetch(final String name) {
        return Fn.getNull(null, () -> MISSIONS.stream()
                .filter(mission -> name.equals(mission.getName()))
                .findFirst().orElse(null), name);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy