Class ContractCacheOperation

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

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

    • contractName

      @Value("${cache.contract.contract-map}") private String contractName
      map cache.contract cache established.
    • timeToLive

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

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

    • ContractCacheOperation

      public ContractCacheOperation()
  • Method Details

    • cacheOperations

      public void cacheOperations(List<CacheOperationEnum> operations, String id, Object obj)
      Cache contract.
      Parameters:
      operations - to be executed
      id - key of the registry
      obj - to be saved
    • getContractInformationByUserSession

      public es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto getContractInformationByUserSession(String id)
      getting all Contract object.
      Parameters:
      id - key of the registry
      Returns:
      ContractCacheDto
    • insertContractCache

      public es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto insertContractCache(es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto contractCacheDto)
      insert Cache object.
      Parameters:
      contractCacheDto - value of the registry
      Returns:
      ContractCacheDto
    • refreshContractCache

      public es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.ContractCacheDto refreshContractCache(String sessionId)
      refresh contract Cache object.
      Parameters:
      sessionId - session identifier
      Returns:
      ContractCacheDto
    • existsContractInCache

      public boolean existsContractInCache(String sessionId)
      exists contract object.
      Parameters:
      sessionId - session identifier
      Returns:
      boolean