Class ContractCacheOperation

java.lang.Object
es.kukenan.smartfi.microservice.contracts.cache.ContractCacheOperation

@Component @RefreshScope public class ContractCacheOperation extends Object
Operation over contract cache.
  • Field Details

    • contractUuidSession

      @Value("${cache.contracts-uuid-session-map}") private String contractUuidSession
      map contract-uuid-session cache established.
    • contractTimeToLive

      @Value("${cache.contracts-time-to-live}") private Long contractTimeToLive
      ttl contract time-to-live established.
    • hazelcastInstance

      @Autowired private com.hazelcast.core.HazelcastInstance hazelcastInstance
      HazelcastInstance hazelcastInstance.
  • Constructor Details

    • ContractCacheOperation

      public ContractCacheOperation()
  • Method Details

    • cacheOperationsContract

      public void cacheOperationsContract(List<SessionCacheOperationEnum> operations, String userId, Object obj)
      Contract cache operations.
      Parameters:
      operations - to be executed
      userId - key of the registry
      obj - to be saved
    • insertContractCache

      public List<es.kukenan.smartfi.microservice.contracts.api.contract.ContractDto> insertContractCache(List<es.kukenan.smartfi.microservice.contracts.api.contract.ContractDto> contracts, String userId)
      getting all Cache object.
      Parameters:
      contracts - value of the registry
      userId - user identifier
      Returns:
      ContractCacheDto
    • getAllInformationByUuid

      public List<es.kukenan.smartfi.microservice.contracts.api.contract.ContractDto> getAllInformationByUuid(String userId)
      getting all Cache object.
      Parameters:
      userId - key of the registry
      Returns:
      uuidCache object
    • existsContractInCache

      public boolean existsContractInCache(String userId)
      exists contract object.
      Parameters:
      userId - user identifier
      Returns:
      boolean
    • refreshContractCache

      public List<es.kukenan.smartfi.microservice.contracts.api.contract.ContractDto> refreshContractCache(String userId)
      refresh contract Cache object.
      Parameters:
      userId - user identifier
      Returns:
      ContractCacheDto