final private Connection createAsyncConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
final private Connection createAsyncConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
final private Connection createAsynchConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
/** * Creates a {@link Connection} with {@link Connection.Modality#Synchronous} semantics * suitable for use by synchronous (blocking) JRedis clients. * * @param connSpec connection's specification * @param redisVersion redis protocol compliance * @return */ protected Connection createSyncConnection(ConnectionSpec connSpec){ Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); setConnection(new FaultedConnection(connSpec, msg)); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
/** * Creates a {@link Connection} with {@link Connection.Modality#Synchronous} semantics * suitable for use by synchronous (blocking) JRedis clients. * * @param connSpec connection's specification * @param redisVersion redis protocol compliance * @return */ protected Connection createSyncConnection(ConnectionSpec connSpec){ Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); setConnection(new FaultedConnection(connSpec, msg)); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
/** * Creates a {@link Connection} with {@link Connection.Modality#Synchronous} semantics * suitable for use by synchronous (blocking) JRedis clients. * * @param connSpec connection's specification * @param redisVersion redis protocol compliance * @return */ protected Connection createSynchConnection(ConnectionSpec connSpec){ Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); setConnection(new FaultedConnection(connSpec, msg)); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
Log.error ("ProviderException: " + bug.getLocalizedMessage()); bug.printStackTrace(); pending.setCRE(bug);
Log.error ("ProviderException: " + bug.getLocalizedMessage()); bug.printStackTrace(); pending.setCRE(bug);
Log.error ("ProviderException: " + bug.getLocalizedMessage()); bug.printStackTrace(); pending.setCRE(bug);
Log.bug ("serviceRequest() -- ProviderException: " + bug.getLocalizedMessage()); Log.log ("serviceRequest() -- closing connection ..."); disconnect();
Log.bug ("serviceRequest() -- ProviderException: " + bug.getLocalizedMessage()); Log.log ("serviceRequest() -- closing connection ..."); disconnect();
Log.bug ("serviceRequest() -- ProviderException: " + bug.getLocalizedMessage()); Log.log ("serviceRequest() -- closing connection ..."); disconnect();