public ValuesCheckerRunnable( long start, long end, int bufsize, int threadNum, String mapperSpec, DataMapper<?> dataMapper, ConcurrentLinkedQueue<Integer> readyQueue, Condition goTime, Lock lock, List<Object> expected ) { this.start = start; this.end = end; this.bufsize = bufsize; this.threadNum = threadNum; this.readyQueue = readyQueue; this.expected = expected; this.goTime = goTime; this.lock = lock; this.mapper = (dataMapper != null) ? dataMapper : VirtData.getMapper(mapperSpec) .orElseThrow( () -> new RuntimeException("unable to resolve mapper for " + mapperSpec) ); }
Optional<DataMapper<String>> func = VirtData.getMapper(expr); funcs.add(func.orElseThrow(() -> new RuntimeException("Unable to resolve function: " + expr)));