package com.atlassian.bitbucket.mesh.repository;

public enum ShardState {

    //The data store is accessible and compatible
    AVAILABLE(true),
    //The current application version cannot handle the data store. Either the data store type was not recognized,
    //or the data store layout incompatible with the current version.
    INCOMPATIBLE(false),
    //The data store hasn't completed initializing (locking the directory, running upgrade tasks)
    STARTING(false),
    //The data store has shut down
    STOPPED(false),
    //Unavailable for some other reason
    UNAVAILABLE(false);

    private final boolean accessible;

    ShardState(boolean accessible) {
        this.accessible = accessible;
    }

    public boolean isAccessible() {
        return accessible;
    }
}
