@Override public Set<K> keySet() { return decorated().keySet(); }
@Override public Set<K> keySet() { return UnmodifiableSet.unmodifiableSet(decorated().keySet()); }
@Override public String debugDump(int indent) { StringBuilder sb = new StringBuilder(); DebugUtil.indentDebugDump(sb, indent); sb.append("SchemaRegistry:"); sb.append(" Parsed Schemas:"); for (String namespace: parsedSchemas.keySet()) { sb.append("\n"); DebugUtil.indentDebugDump(sb, indent + 1); sb.append(namespace); sb.append(": "); sb.append(parsedSchemas.get(namespace)); } return sb.toString(); }
/** * Going through the groups and renaming wrongly-named tasks to the correct names. */ private int renameWorkers(List<Task> currentWorkers, MultiValuedMap<String, WorkerKey> shouldBeWorkers, OperationResult result) throws SchemaException, ObjectNotFoundException, ObjectAlreadyExistsException { int count = 0; for (String shouldBeGroup : shouldBeWorkers.keySet()) { Collection<WorkerKey> shouldBeWorkersInGroup = shouldBeWorkers.get(shouldBeGroup); for (Task currentWorker : new ArrayList<>(currentWorkers)) { if (Objects.equals(shouldBeGroup, currentWorker.getGroup())) { if (!shouldBeWorkersInGroup.isEmpty()) { WorkerKey nextWorker = shouldBeWorkersInGroup.iterator().next(); renameWorker(currentWorker, nextWorker.name, result); currentWorkers.remove(currentWorker); shouldBeWorkersInGroup.remove(nextWorker); count++; } else { break; // no more workers for this group } } } } LOGGER.trace("After renameWorkers (result: {}):\nCurrent workers: {}\nShould be workers: {}", count, currentWorkers, shouldBeWorkers); return count; }
StringBuilder chartType = new StringBuilder(); for (String key : recommenderScoreMap.keySet()) { String data = recommenderScoreMap.get(key).stream().map(Object::toString).collect(Collectors.joining(", "));
List<String> fragmentedNamespaces = schemasByNamespace.keySet().stream() .filter(ns -> schemasByNamespace.get(ns).size() > 1) .collect(Collectors.toList());
for (DJGroup key : mmap.keySet()) { Collection<DJChart> charts = mmap.get(key); List<DJChart> l = new ArrayList<DJChart>(charts); for (PropertyColumn key : mmap2.keySet()) { Collection<ar.com.fdvs.dj.domain.chart.DJChart> charts = mmap2.get(key); ArrayList<ar.com.fdvs.dj.domain.chart.DJChart> l = new ArrayList<ar.com.fdvs.dj.domain.chart.DJChart>(charts);
.forEach(fs -> annotations.put(new Offset(fs.getBegin(), fs.getEnd()), fs)); List<Offset> sortedAnnotationKeys = new ArrayList<>(annotations.keySet()); sortedAnnotationKeys .sort(comparingInt(Offset::getBegin).thenComparingInt(Offset::getEnd));
for (DJGroup key : mmap.keySet()) { Collection<DJChart> charts = mmap.get(key); List<DJChart> l = new ArrayList<DJChart>(charts); for (PropertyColumn key : mmap2.keySet()) { Collection<ar.com.fdvs.dj.domain.chart.DJChart> charts = mmap2.get(key); ArrayList<ar.com.fdvs.dj.domain.chart.DJChart> l = new ArrayList<ar.com.fdvs.dj.domain.chart.DJChart>(charts);
for (Pair<EdgeLabel, VertexLabel> edgeLabelVertexLabelPair : this.foreignKeyOutEdgesToDelete.keySet()) { EdgeLabel outEdgeLabel = edgeLabelVertexLabelPair.getKey(); VertexLabel vertexLabel = edgeLabelVertexLabelPair.getValue(); SqlgSqlExecutor.executeDropEdges(this.sqlgGraph, outEdgeLabel, sql, this.callbackRegistry.getCallbacks()); for (Pair<EdgeLabel, VertexLabel> edgeLabelVertexLabelPair : this.foreignKeyInEdgesToDelete.keySet()) { EdgeLabel inEdgeLabel = edgeLabelVertexLabelPair.getKey(); VertexLabel vertexLabel = edgeLabelVertexLabelPair.getValue(); SqlgSqlExecutor.executeDropEdges(this.sqlgGraph, inEdgeLabel, sql, this.callbackRegistry.getCallbacks()); for (EdgeLabel edgeLabel : this.edgesToDelete.keySet()) { Collection<RecordId.ID> ids = this.edgesToDelete.get(edgeLabel); String sql = this.sqlgGraph.getSqlDialect().drop(edgeLabel, ids); SqlgSqlExecutor.executeDrop(this.sqlgGraph, sql); for (VertexLabel vertexLabel : this.verticesToDelete.keySet()) { Collection<RecordId.ID> ids = this.verticesToDelete.get(vertexLabel); String sql = this.sqlgGraph.getSqlDialect().drop(vertexLabel, ids);
for (Pair<EdgeLabel, VertexLabel> edgeLabelVertexLabelPair : this.foreignKeyOutEdgesToDelete.keySet()) { EdgeLabel outEdgeLabel = edgeLabelVertexLabelPair.getKey(); VertexLabel vertexLabel = edgeLabelVertexLabelPair.getValue(); SqlgSqlExecutor.executeDropEdges(this.sqlgGraph, outEdgeLabel, sql, this.callbackRegistry.getCallbacks()); for (Pair<EdgeLabel, VertexLabel> edgeLabelVertexLabelPair : this.foreignKeyInEdgesToDelete.keySet()) { EdgeLabel inEdgeLabel = edgeLabelVertexLabelPair.getKey(); VertexLabel vertexLabel = edgeLabelVertexLabelPair.getValue(); SqlgSqlExecutor.executeDropEdges(this.sqlgGraph, inEdgeLabel, sql, this.callbackRegistry.getCallbacks()); for (EdgeLabel edgeLabel : this.edgesToDelete.keySet()) { Collection<RecordId.ID> ids = this.edgesToDelete.get(edgeLabel); String sql = this.sqlgGraph.getSqlDialect().drop(edgeLabel, ids); SqlgSqlExecutor.executeDrop(this.sqlgGraph, sql); for (VertexLabel vertexLabel : this.verticesToDelete.keySet()) { Collection<RecordId.ID> ids = this.verticesToDelete.get(vertexLabel); String sql = this.sqlgGraph.getSqlDialect().drop(vertexLabel, ids);
rv.offsprings.add(offspring); } else { for (Long id : modificationsForId.keySet()) { ObjectDeltaImpl<O> offspring = createOffspring(); modificationsForId.get(id).forEach(mod -> offspring.addModification(mod));