Code example for Cache

Methods: invalidate

0
        cohortCache.invalidate(transactionID);
        return cohortEntry;
    } 
 
    public void removeCohortEntry(String transactionID) {
        cohortCache.invalidate(transactionID);
    } 
 
    public boolean isCurrentTransaction(String transactionID) {
        return currentCohortEntry != null &&
                currentCohortEntry.getTransactionID().equals(transactionID);
    } 
 
    /** 
     * This method is called when a transaction is complete, successful or not. If the given 
     * given transaction ID matches the current in-progress transaction, the next cohort entry, 
     * if any, is dequeued and processed. 
     * 
     * @param transactionID the ID of the completed transaction 
     * @param removeCohortEntry if true the CohortEntry for the transaction is also removed from