public void reduce() { if (queue == null || queue.size() == 0) { MLogUtil.log().d(Db.class,"closing bracked without open bracked"); current = null; return; } queue.removeLast(); if (queue.size() == 0) current = null; else current = queue.getLast(); }
@Override protected void removeService(ServiceReference<SchedulerService> reference, SchedulerService service) { log().d("remove service",reference.getBundle().getSymbolicName(),reference.getBundle().getBundleId(),MOsgi.getState(reference.getBundle()),service.getClass().getCanonicalName()); removeSchedulerService(service); }
@Override public void releaseLock(Persistable object, String key, LockBase transaction) { synchronized (this) { LockObject obj = locks.get(key); if (obj == null) return; if (obj.owner.equals(transaction.getName())) locks.remove(key); else log().d("it's not lock owner",key,transaction); } }
@Override public void scheduleAtFixedRate(TimerTask task, long delay, long period) { log().d("scheduleAtFixedRate",task,delay,period); timer.scheduleAtFixedRate(new TimerTaskWrap(this, null, task), delay, period); }
@Override public void schedule(String name, TimerTask task, long delay, long period) { log().d("schedule",name,task,delay,period); timer.schedule(new TimerTaskWrap(this,name, task), delay, period); }
@Override public void schedule(String name, TimerTask task, Date firstTime, long period) { log().d("schedule",name,task,firstTime,period); timer.schedule(new TimerTaskWrap(this,name, task), firstTime, period); }
@Override public void scheduleAtFixedRate(String name, TimerTask task, Date firstTime, long period) { log().d("scheduleAtFixedRate",name,task,firstTime,period); timer.scheduleAtFixedRate(new TimerTaskWrap(this,name, task), firstTime, period); }
@Override public void schedule(TimerTask task, long delay) { log().d("schedule",task,delay); timer.schedule(new TimerTaskWrap(this, null, task), delay); }
@Override public void schedule(TimerTask task, long delay, long period) { log().d("schedule",task,delay,period); timer.schedule(new TimerTaskWrap(this, null, task), delay, period); }
@Override public void schedule(TimerTask task, Date firstTime, long period) { log().d("schedule",task,firstTime,period); timer.schedule(new TimerTaskWrap(this, null, task), firstTime, period); }
@Override public void schedule(String name, TimerTask task, Date time) { log().d("schedule",name,task,time); timer.schedule(new TimerTaskWrap(this,name, task), time); }
private void load() { try { config = new PropertiesConfigFile(file); } catch (IOException e) { log().d(file,e); } }
protected OperationResult doExecute2(TaskContext context) throws Exception { try { if (task != null) task.run(context); } catch (LinkageError le) { log.d("cancel task because of fatal errors",this, le); cancel(); } return null; }
protected void alterColumnAdd(Statement sth, String tn, IConfig cfield) { // String sql = "ALTER TABLE " + tn + " ADD COLUMN (" + getFieldConfig(cfield) + ")"; String sql = "ALTER TABLE " + tn + " ADD COLUMN " + getFieldConfig(cfield); log().d("alter table",sql); try { sth.execute(sql); } catch (Exception e) { log().i(sql,e); } }
protected void alterColumn(Statement sth,String tn, IConfig cfield) { String sql = "ALTER TABLE " + tn + " MODIFY COLUMN " + getFieldConfig(cfield); log().d("alter table",sql); try { sth.execute(sql); } catch (Exception e) { log().i(sql,e); } }
@Override public void resetConnection(String name) { if (name == null) return; log().d("reset connection",name); for ( JmsDataChannel c : new LinkedList<JmsDataChannel>(channels.values())) if (name.equals(c.getConnectionName())) try { c.onDisconnect(); } catch (Throwable t) { log().w(name,c,t); } }
public UiWizard getWizard() { Object obj = config.getProperty(WIZARD); if (obj == null) return null; if (obj instanceof UiWizard) return (UiWizard)obj; try { if (obj instanceof String) return getForm().getAdapterProvider().createWizard((String)obj); } catch (Exception e) { MLogUtil.log().d(e); } return null; // TODO }
@Override public boolean canExecute(CaoConfiguration configuration) { try { return configuration.getList().size() != 1 && core.containsNodes(configuration.getList()) ; } catch (Throwable t) { log().d(t); return false; } }
@Override public boolean canExecute(CaoConfiguration configuration) { try { return configuration.getList().size() != 1 && core.containsNodes(configuration.getList()) ; } catch (Throwable t) { log().d(t); return false; } }
@Override public boolean canExecute(CaoConfiguration configuration) { try { return configuration.getList().size() != 1 && core.containsNodes(configuration.getList()) ; } catch (Throwable t) { log().d(t); return false; } }