public LabeledGroup(Map<String, Object> pool, int index) { super(pool, index, GroupType.LABELED); drillbitLabelExpr = (String) pool.get(DRILLBIT_LABEL); if (drillbitLabelExpr == null) { Log.warn("Labeled pool is missing the drillbit label expression (" + DRILLBIT_LABEL + "), will treat pool as basic."); } }
public BoundedThreadPool() { Log.warn(BoundedThreadPool.class+" deprecated: use "+QueuedThreadPool.class); _name="btpool"+__id++; }
public static byte[] getBytes(String s) { try { return s.getBytes(__ISO_8859_1); } catch(Exception e) { Log.warn(e); return s.getBytes(); } }
public static byte[] getBytes(String s,String charset) { try { return s.getBytes(charset); } catch(Exception e) { Log.warn(e); return s.getBytes(); } } }
private static void unwind(Throwable th) { if (th==null) return; for (int i=0;i<__nestedEx.length;i++) { try { Method get_target = th.getClass().getMethod(__nestedEx[i],__noArgs); Throwable th2=(Throwable)get_target.invoke(th,(Object[])null); if (th2!=null && th2!=th) warn("Nested in "+th+":",th2); } catch(Exception ignore){} } }
public Logger getLogger(String name) { try { return new Slf4jLog(name); } catch (Exception e) { Log.warn(e); return this; } }
public Object fromJSON(Map map) { if (!_fromJSON) throw new UnsupportedOperationException(); try { Class c=Loader.loadClass(getClass(),(String)map.get("class")); return _valueOf.invoke(null,new Object[]{c,map.get("value")}); } catch(Exception e) { Log.warn(e); } return null; }
public Object fromJSON(Map map) { if (!_fromJSON) throw new UnsupportedOperationException(); try { synchronized(_format) { return _format.parseObject((String)map.get("value")); } } catch(Exception e) { Log.warn(e); } return null; }
Log.warn("Error scanning watched files", e);
Log.warn(_threads.size()+" threads could not be stopped");
Log.warn(_threads.size()+" threads could not be stopped");
public URL getAlias() { if (__checkAliases && !_aliasChecked) { try { String abs=_file.getAbsolutePath(); String can=_file.getCanonicalPath(); if (abs.length()!=can.length() || !abs.equals(can)) _alias=new File(can).toURI().toURL(); _aliasChecked=true; if (_alias!=null && Log.isDebugEnabled()) { Log.debug("ALIAS abs="+abs); Log.debug("ALIAS can="+can); } } catch(Exception e) { Log.warn(Log.EXCEPTION,e); return getURL(); } } return _alias; }
Log.warn(e.toString()); Log.debug(e); return new String(bytes,0,n);
Log.warn("Bad Resource: "+resource); throw e;
Log.warn(Log.EXCEPTION,th);
/** Copy Stream in to Stream out until EOF or exception. * in own thread */ public static void copyThread(InputStream in, OutputStream out) { try{ Job job=new Job(in,out); if (!Singleton.__pool.dispatch(job)) job.run(); } catch(Exception e) { Log.warn(e); } }
/** Copy Stream in to Stream out until EOF or exception * in own thread */ public static void copyThread(Reader in, Writer out) { try { Job job=new Job(in,out); if (!Singleton.__pool.dispatch(job)) job.run(); } catch(Exception e) { Log.warn(e); } }
public final void stop() throws Exception { synchronized (_lock) { try { if (_state == STOPPING || _state == STOPPED) return; setStopping(); doStop(); Log.debug("stopped {}",this); setStopped(); } catch (Exception e) { Log.warn("failed " + this,e); setFailed(e); throw e; } catch (Error e) { Log.warn("failed " + this,e); setFailed(e); throw e; } } }
public final void start() throws Exception { synchronized (_lock) { try { if (_state == STARTED || _state == STARTING) return; setStarting(); doStart(); Log.debug("started {}",this); setStarted(); } catch (Exception e) { Log.warn("failed " + this,e); setFailed(e); throw e; } catch (Error e) { Log.warn("failed " + this,e); setFailed(e); throw e; } } }