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

io.alphatier.java.Task Maven / Gradle / Ivy

Go to download

Alphatier is a resource management library. It is designed to allow different schedulers to share the resources of a pool of executors in order to execute tasks with those.

There is a newer version: 0.2.0
Show newest version
package io.alphatier.java;

import java.util.Map;

public final class Task {
    private final String id;
    private final String executorId;
    private final String schedulerId;
    private final LifecyclePhase lifecyclePhase;
    private final Map resources;
    private final Map metadata;
    private final Number metadataVersion;

    public Task(final String id, final String executorId, final String schedulerId, final LifecyclePhase lifecyclePhase,
                final Map resources, final Map metadata,
                final Number metadataVersion) {
        this.id = id;
        this.executorId = executorId;
        this.schedulerId = schedulerId;
        this.lifecyclePhase = lifecyclePhase;
        this.resources = resources;
        this.metadata = metadata;
        this.metadataVersion = metadataVersion;
    }

    public String getId() {
        return id;
    }

    public String getExecutorId() {
        return executorId;
    }

    public String getSchedulerId() {
        return schedulerId;
    }

    public LifecyclePhase getLifecyclePhase() {
        return lifecyclePhase;
    }

    public Map getResources() {
        return resources;
    }

    public Map getMetadata() {
        return metadata;
    }

    public Number getMetadataVersion() {
        return metadataVersion;
    }

    @Override
    public String toString() {
        return "Task{" +
                "id='" + id + '\'' +
                ", executorId='" + executorId + '\'' +
                ", schedulerId='" + schedulerId + '\'' +
                ", lifecyclePhase=" + lifecyclePhase +
                ", resources=" + resources +
                ", metadata=" + metadata +
                ", metadataVersion=" + metadataVersion +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy