/** * Check if a given row matches the specified criteria * @param criteria the criteria * @param row row of currently persisted data * @return true if it matches, false otherwise */ private boolean rowMatches(Criteria criteria, ZNRecordRow row) { String instanceName = normalizePattern(criteria.getInstanceName()); String resourceName = normalizePattern(criteria.getResource()); String partitionName = normalizePattern(criteria.getPartition()); String partitionState = normalizePattern(criteria.getPartitionState()); return stringMatches(instanceName, row.getMapSubKey()) && stringMatches(resourceName, row.getRecordId()) && stringMatches(partitionName, row.getMapKey()) && stringMatches(partitionState, row.getMapValue()); }
/** * Check if a given row matches the specified criteria * @param criteria the criteria * @param row row of currently persisted data * @return true if it matches, false otherwise */ private boolean rowMatches(Criteria criteria, ZNRecordRow row) { String instanceName = normalizePattern(criteria.getInstanceName()); String resourceName = normalizePattern(criteria.getResource()); String partitionName = normalizePattern(criteria.getPartition()); String partitionState = normalizePattern(criteria.getPartitionState()); return stringMatches(instanceName, row.getMapSubKey()) && stringMatches(resourceName, row.getRecordId()) && stringMatches(partitionName, row.getMapKey()) && stringMatches(partitionState, row.getMapValue()); }