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

me.redtea.carcadex.repo.MutableRepo Maven / Gradle / Ivy

package me.redtea.carcadex.repo;

import me.redtea.carcadex.reload.Reloadable;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.Optional;
import java.util.function.Predicate;

public interface MutableRepo extends Repo, Reloadable {

    /**
     * Updates/saves object in repo
     * @param value - object to update
     * @return updated object
     */
    V set(@NotNull K key, @NotNull V value);

    /**
     * Removes object from repo by key
     * @param key - key of object
     * @return removed object
     */
    V remove(@NotNull K key);

    /**
     * Saves all cache to storage
     */
    void saveAll();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy