void afterCommit() { Preconditions.checkState(this.getAbstractLabel().getSchema().getTopology().isSqlWriteLockHeldByCurrentThread(), "Partition.afterCommit must hold the write lock"); for (Iterator<Map.Entry<String, Partition>> it = this.uncommittedPartitions.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Partition> entry = it.next(); this.partitions.put(entry.getKey(), entry.getValue()); entry.getValue().afterCommit(); it.remove(); } for (Iterator<String> it = this.uncommittedRemovedPartitions.iterator(); it.hasNext(); ) { String prop = it.next(); this.partitions.remove(prop); it.remove(); } for (Iterator<Map.Entry<String, Partition>> it = this.partitions.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Partition> entry = it.next(); entry.getValue().afterCommit(); } }
void afterCommit() { Preconditions.checkState(this.getAbstractLabel().getSchema().getTopology().isSqlWriteLockHeldByCurrentThread(), "Partition.afterCommit must hold the write lock"); for (Iterator<Map.Entry<String, Partition>> it = this.uncommittedPartitions.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Partition> entry = it.next(); this.partitions.put(entry.getKey(), entry.getValue()); entry.getValue().afterCommit(); it.remove(); } for (Iterator<String> it = this.uncommittedRemovedPartitions.iterator(); it.hasNext(); ) { String prop = it.next(); this.partitions.remove(prop); it.remove(); } for (Iterator<Map.Entry<String, Partition>> it = this.partitions.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Partition> entry = it.next(); entry.getValue().afterCommit(); } }
Map.Entry<String, Partition> entry = it.next(); this.partitions.put(entry.getKey(), entry.getValue()); entry.getValue().afterCommit(); it.remove(); entry.getValue().afterCommit();
Map.Entry<String, Partition> entry = it.next(); this.partitions.put(entry.getKey(), entry.getValue()); entry.getValue().afterCommit(); it.remove(); entry.getValue().afterCommit();