Code example for Cache

Methods: getIfPresent

0
      throw new RuntimeException(e);
    } 
  } 
 
  public boolean checkTimedout(Long transactorId, long lockTs) {
    AtomicLong timedoutLockTs = timeoutCache.getIfPresent(transactorId);
    return timedoutLockTs != null && lockTs <= timedoutLockTs.get();
  } 
 
  public boolean checkExists(Long transactorId) {
    return cache.getCurrentData(TransactorNode.getNodePath(env, transactorId)) != null;
  } 
   
  public TcStatus getStatus() { 
    return status;
  } 
 
  @Override 
  public void close() { 
    status = TcStatus.CLOSED;
Stop searching for code, let great code find you!  Add Codota to your java IDE