Interface DistributedSet

All Known Implementing Classes:
DistributedRedisSet

public interface DistributedSet
Interface representing a distributed set for caching entities. Provides methods for adding entities to the set and retrieving them.
Since:
1.0
Author:
Blyzhnytsia Team
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    add(Class<T> entityClass, String cacheKey, T entity)
    Adds an entity to the distributed set.
    <T> Optional<T>
    get(Class<T> entityClass, String cacheKey)
    Retrieves an entity from the distributed set.
  • Method Details

    • add

      <T> void add(Class<T> entityClass, String cacheKey, T entity)
      Adds an entity to the distributed set.
      Type Parameters:
      T - the type of the entity
      Parameters:
      entityClass - the class of the entity
      cacheKey - the cache key associated with the entity
      entity - the entity to add to the set
    • get

      <T> Optional<T> get(Class<T> entityClass, String cacheKey)
      Retrieves an entity from the distributed set.
      Type Parameters:
      T - the type of the entity
      Parameters:
      entityClass - the class of the entity
      cacheKey - the cache key associated with the entity
      Returns:
      an Optional containing the retrieved entity, or empty if not found