@Override public void clear() { front.reset(); ArrayList<BackendConnection> rollbacks = new ArrayList<>(); KeySetView<Integer, BackendConnection> keys = connections.keySet(); for (Integer id : keys) { BackendConnection con = connections.remove(id); if (con.isClosed()) { continue; } if (con.isRunning()) { con.setHandler(null); con.close("cleared"); } else { rollbacks.add(con); } } ResultHandler handler = new RollbackHandler(); rollbacks.forEach(con -> con.query("rollback", handler)); }
@Override public void clear() { front.reset(); KeySetView<Integer, BackendConnection> keys = connections.keySet(); for (Integer id : keys) { BackendConnection con = connections.remove(id); if (con.isClosed()) { continue; } con.setHandler(null); con.close("cleared"); } this.state = XAState.FINISHED; this.XID = null; }
public void release() { front.reset(); KeySetView<Integer, BackendConnection> keys = connections.keySet(); for (Integer id : keys) { BackendConnection con = connections.remove(id); con.release(); } this.state = XAState.FINISHED; this.XID = null; }
@Override public void clear() { front.reset(); KeySetView<Integer, BackendConnection> keys = connections.keySet(); for (Integer id : keys) { BackendConnection con = connections.remove(id); con.setHandler(null); con.close("cleared"); } }
public KeySetView<ChunkPos, StabilityData> getChunks() { return this.chunkData.keySet(); }
/** * Returns the key set in the hash map table. The order of the keys will be * unpredictable. * * @return the key set of the hash map. */ public ConcurrentHashMap.KeySetView<String, ServiceMetaData> getKeySet() { return hashMap.keySet(); }