Class CotaniAchievements

java.lang.Object
com.cotani.achievement.CotaniAchievements

public final class CotaniAchievements extends Object
Factories for the cotani-achievement module.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
    Creates a service over a caller-owned repository.
    fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options)
    Creates a service over a repository with explicit operational options.
    fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options, Clock clock)
    Creates a service with explicit operational options and clock.
    inMemory(com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
    Creates an isolated in-memory achievement service.
    static List<com.cotani.storage.migration.Migration>
    Returns the migrations required by the SQL adapter.
    storage(com.cotani.storage.api.CotaniStorage storage, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
    Creates a SQL-backed service over caller-owned Cotani storage.
    storage(com.cotani.storage.api.CotaniStorage storage, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options)
    Creates a SQL-backed service with explicit operational options.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • inMemory

      public static AchievementService inMemory(com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
      Creates an isolated in-memory achievement service.
    • fromRepository

      public static AchievementService fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
      Creates a service over a caller-owned repository.
    • fromRepository

      public static AchievementService fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options)
      Creates a service over a repository with explicit operational options.
    • fromRepository

      public static AchievementService fromRepository(AchievementRepository repository, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options, Clock clock)
      Creates a service with explicit operational options and clock.
    • storage

      public static AchievementService storage(com.cotani.storage.api.CotaniStorage storage, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus)
      Creates a SQL-backed service over caller-owned Cotani storage.
    • storage

      public static AchievementService storage(com.cotani.storage.api.CotaniStorage storage, com.cotani.statistics.api.StatisticService statistics, com.cotani.reward.api.RewardService rewards, com.cotani.event.api.EventBus eventBus, AchievementServiceOptions options)
      Creates a SQL-backed service with explicit operational options.
    • migrations

      public static List<com.cotani.storage.migration.Migration> migrations()
      Returns the migrations required by the SQL adapter.