private boolean hasConflictsWithFences()

in transaction-client/src/main/java/org/apache/omid/tso/client/MockTSOClient.java [75:94]


    private boolean hasConflictsWithFences(long transactionId, Set<? extends CellId> cells) {
        Set<Long> tableIDs = new HashSet<Long>();
        for (CellId c : cells) {
            tableIDs.add(c.getTableId());
        }

        if (! fenceMap.isEmpty()) {
            for (long tableId : tableIDs) {
                Long fence = fenceMap.get(tableId);
                if (fence != null && transactionId < fence) {
                    return true;
                }
                if (fence != null && fence < lwm.get()) { // GC
                    fenceMap.remove(tableId);
                }
            }
        }

        return false;
    }