super.close(); synchronized (this) { clear(); if (null != _evictionCursor) { _evictionCursor.close();
@Override protected void doDisconnect() throws Exception { dispatcherSocketsPool.clear(); }
/** * Clears any previously compiled patterns. */ public void clear() { _pool.clear(); }
@Override protected void doDisconnect() throws Exception { socketsPool.clear(); }
/** * Clears any previously compiled patterns. */ public void clear() { _pool.clear(); }
public void clear(Object key) throws Exception, UnsupportedOperationException { pool.clear(key); }
public void clear() { pool.clear(); }
public void clear() { pool.clear(); }
public void resetEventDidOccur() { _pool.clear(); }
public void clear(Object key) throws Exception, UnsupportedOperationException { pool.clear(key); }
protected void clearRequesters() { if (requesters != null) { logger.debug("Clearing Requester pool"); requesters.clear(); logger.debug("Requester pool cleared"); } }
protected void clearRequesters() { if (requesters != null) { logger.debug("Clearing Requester pool"); requesters.clear(); logger.debug("Requester pool cleared"); } }
@Override public void evict(ServiceEndPoint endPoint) { checkNotNull(endPoint); // Mark all service instances created prior to now as invalid so that we don't inadvertently check them back in _invalidRevisions.put(endPoint, _revisionNumber.incrementAndGet()); _pool.clear(endPoint); }
void releaseSocket(DatagramSocket socket, ImmutableEndpoint endpoint) throws Exception { // Sockets can't be recycled if we close them at the end... if (!keepSendSocketOpen) { dispatcherSocketsPool.clear(endpoint); } else { dispatcherSocketsPool.returnObject(endpoint, socket); } }
@Override public void evict(ServiceEndPoint endPoint) { checkNotNull(endPoint); // Mark all service instances created prior to now as invalid so that we don't inadvertently check them back in _invalidRevisions.put(endPoint, _revisionNumber.incrementAndGet()); _pool.clear(endPoint); }
private void discardClient() { transportPool.clear(dataPublisherConfiguration.getPublisherKey()); }
public void disconnect(DataPublisherConfiguration dataPublisherConfiguration) { Object client = null; try { client = secureTransportPool.borrowObject(dataPublisherConfiguration.getPublisherKey()); disconnect(client,dataPublisherConfiguration.getSessionId()); } catch (Exception e) { if(log.isDebugEnabled()){ log.error("Cannot connect to the server at " + dataPublisherConfiguration.getPublisherKey() + " Authenticator", e); } log.warn("Cannot connect to the server at " + dataPublisherConfiguration.getPublisherKey() + " Authenticator"); } finally { try { secureTransportPool.returnObject(dataPublisherConfiguration.getPublisherKey(), client); } catch (Exception e) { secureTransportPool.clear(dataPublisherConfiguration.getPublisherKey()); } } }
public void disconnect(DataEndpointConfiguration dataPublisherConfiguration) { Object client = null; try { client = this.dataEndpointConfiguration.getSecuredTransportPool().borrowObject(dataPublisherConfiguration.getAuthKey()); this.dataEndpoint.logout(client, dataPublisherConfiguration.getSessionId()); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Cannot connect to the server at " + dataPublisherConfiguration.getAuthURL() + ", for user: " + dataPublisherConfiguration.getUsername(), e); } log.warn("Cannot connect to the server at " + dataPublisherConfiguration.getAuthURL() + ", for user: " + dataPublisherConfiguration.getUsername()); } finally { try { this.dataEndpointConfiguration.getSecuredTransportPool().returnObject(dataPublisherConfiguration.getAuthKey(), client); } catch (Exception e) { this.dataEndpointConfiguration.getSecuredTransportPool().clear(dataPublisherConfiguration.getAuthKey()); } } }
private void connect() throws DataEndpointAuthenticationException { Object client = null; try { client = this.dataEndpointConfiguration.getSecuredTransportPool(). borrowObject(dataEndpointConfiguration.getAuthKey()); String sessionId = this.dataEndpoint. login(client, dataEndpointConfiguration.getUsername(), dataEndpointConfiguration.getPassword()); dataEndpointConfiguration.setSessionId(sessionId); } catch (Throwable e) { log.error(e.getMessage(), e); throw new DataEndpointAuthenticationException("Cannot borrow client for " + dataEndpointConfiguration.getAuthURL(), e); } finally { try { this.dataEndpointConfiguration.getSecuredTransportPool().returnObject(dataEndpointConfiguration.getAuthKey(), client); } catch (Exception e) { this.dataEndpointConfiguration.getSecuredTransportPool().clear(dataEndpointConfiguration.getAuthKey()); } } }
public String connect(DataPublisherConfiguration dataPublisherConfiguration) throws AuthenticationException, TransportException, AgentException { Object client = null; try { client = secureTransportPool.borrowObject(dataPublisherConfiguration.getPublisherKey()); return connect(client, dataPublisherConfiguration.getReceiverConfiguration().getUserName(), dataPublisherConfiguration.getReceiverConfiguration().getPassword()); } catch (AgentAuthenticatorException e) { throw new AuthenticationException("Access denied for user " + dataPublisherConfiguration.getReceiverConfiguration().getUserName() + " to login " + dataPublisherConfiguration.getPublisherKey(), e); } catch (Exception e) { throw new AgentException("Cannot borrow client for " + dataPublisherConfiguration.getPublisherKey(), e); } finally { try { secureTransportPool.returnObject(dataPublisherConfiguration.getPublisherKey(), client); } catch (Exception e) { secureTransportPool.clear(dataPublisherConfiguration.getPublisherKey()); } } }