// ********************************************************************** // // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** package IceInternal; public class ConnectionReaper { synchronized public void add(Ice.ConnectionI connection, Ice.Instrumentation.Observer observer) { _connections.add(connection); if(observer != null) { observer.detach(); } } synchronized public java.util.List swapConnections() { if(_connections.isEmpty()) { return null; } java.util.List connections = _connections; _connections = new java.util.ArrayList(); return connections; } private java.util.List _connections = new java.util.ArrayList(); };