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

com.hubspot.singularity.executor.SingularityExecutorLogrotateFrequency Maven / Gradle / Ivy

The newest version!
package com.hubspot.singularity.executor;

import com.google.common.base.Optional;

public enum SingularityExecutorLogrotateFrequency {
    HOURLY("daily", Optional.of("0 * * * *")),  // we have to use the "daily" frequency because not all versions of logrotate support "hourly"
    DAILY("daily", Optional.absent()),
    WEEKLY("weekly", Optional.absent()),
    MONTHLY("monthly", Optional.absent());

    private final String logrotateValue;
    private final Optional cronSchedule;

    SingularityExecutorLogrotateFrequency(String logrotateValue, Optional cronSchedule) {
        this.logrotateValue = logrotateValue;
        this.cronSchedule = cronSchedule;
    }

    public String getLogrotateValue() {
        return logrotateValue;
    }

    public Optional getCronSchedule() {
        return cronSchedule;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy