public void start() { if (_app == null) { throw new IllegalStateException( "_app was null - cannot access the thread pool for asynchronous use"); } _app.getThreadPool().addTask(this); }
public void start() { if (_app == null) { throw new IllegalStateException( "_app was null - cannot access the thread pool for asynchronous use"); } _app.getThreadPool().addTask(this); }
/** * Start a thread to refrsh the log. */ private synchronized void startRefreshingLog() { if (!_refreshing) { _app.getThreadPool().addTask(new Refresher()); } }
/** * Start a thread to refrsh the log. */ private synchronized void startRefreshingLog() { if (!_refreshing) { _app.getThreadPool().addTask(new Refresher()); } }
SQLSchemaImpl(ISession session) { _session = session; if (_session != null) { _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { ISQLConnection con = _session.getSQLConnection(); if (con != null) { _dmd = con.getSQLMetaData(); } } }); } }
SQLSchemaImpl(ISession session) { _session = session; if (_session != null) { _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { ISQLConnection con = _session.getSQLConnection(); if (con != null) { _dmd = con.getSQLMetaData(); } } }); } }
public static void store(final ISession session, final SchemaInfoCache schemaInfoCache) { _storingSessionIDs.put(session.getIdentifier(), session.getIdentifier()); session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { privateStore(schemaInfoCache, session); } }); }
private void refreshSchemaInBackground() { final ISession session = getSession(); session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { session.getSchemaInfo().reloadAll(); expandTreeInForeground(); } }); }
private void refreshSchemaInBackground() { final ISession session = getSession(); session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { session.getSchemaInfo().reloadAll(); expandTreeInForeground(); } }); }
public void refreshCatalogs() { removeAll(); _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { initInBackground(); } }); }
public void refreshCatalogs() { removeAll(); _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { initInBackground(); } }); }
public static void store(final ISession session, final SchemaInfoCache schemaInfoCache) { _storingSessionIDs.put(session.getIdentifier(), session.getIdentifier()); session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { privateStore(schemaInfoCache, session); } }); }
/** * @see net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI#selectRoot() */ public void selectRoot() { // TODO: Figure out why the selection of the root node in the object tree // is undone if we don't delay. It seems like some other thread racing // to set the selected node to none. When this happens, the detail pane // for the root node disappears when a session is first opened, or when // an ObjectTree frame is created. This is a really crappy and unreliable // way to fix this problem, but it hides the problem for now. A better // understanding of the architecture of session creation is required // before a proper solution can be attempted. RMM 20051217 _session.getApplication().getThreadPool().addTask(new delaySelectionRunnable()); }
/** * @see net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI#selectRoot() */ public void selectRoot() { // TODO: Figure out why the selection of the root node in the object tree // is undone if we don't delay. It seems like some other thread racing // to set the selected node to none. When this happens, the detail pane // for the root node disappears when a session is first opened, or when // an ObjectTree frame is created. This is a really crappy and unreliable // way to fix this problem, but it hides the problem for now. A better // understanding of the architecture of session creation is required // before a proper solution can be attempted. RMM 20051217 _session.getApplication().getThreadPool().addTask(new delaySelectionRunnable()); }
public void menuSelected(MenuEvent e) { final JMenu menu = (JMenu) e.getSource(); menu.removeAll(); removeActionsOfType(coll,IndexDefragAction.class); app.getThreadPool().addTask(new IteratorIndexesTask(menu)); } public void menuDeselected(MenuEvent e) { }
public void execute(final JFrame owner) { this.currentSQL = getSelectedSelectStatement(); getSession().getApplication().getThreadPool().addTask(new Runnable() { public void run() { doCreateFileOfCurrentSQL(owner); } }); }
/** * Delete records from the selected tables in the object tree. */ public void execute() { ProgressCallBack cb = progressCallBackFactory.create(_session.getApplication().getMainFrame(), i18n.PROGRESS_DIALOG_TITLE, _tables.size()); cb.setLoadingPrefix(i18n.LOADING_PREFIX); DeleteExecuter executer = new DeleteExecuter(cb); _session.getApplication().getThreadPool().addTask(executer); }
/** * Delete records from the selected tables in the object tree. */ public void execute() { ProgressCallBack cb = progressCallBackFactory.create(_session.getApplication().getMainFrame(), i18n.PROGRESS_DIALOG_TITLE, _tables.size()); cb.setLoadingPrefix(i18n.LOADING_PREFIX); DeleteExecuter executer = new DeleteExecuter(cb); _session.getApplication().getThreadPool().addTask(executer); }
private void startKeepAliveTaskIfNecessary() { SQLAliasConnectionProperties connProps = _alias.getConnectionProperties(); if (connProps.isEnableConnectionKeepAlive()) { String keepAliveSql = connProps.getKeepAliveSqlStatement(); long sleepMillis = connProps.getKeepAliveSleepTimeSeconds() * 1000; _sessionConnectionKeepAlive = new SessionConnectionKeepAlive(_conn, sleepMillis, keepAliveSql, _alias.getName()); _app.getThreadPool().addTask(_sessionConnectionKeepAlive, "Session Connection Keep-Alive (" + _alias.getName() + ")"); } }
private void startKeepAliveTaskIfNecessary() { SQLAliasConnectionProperties connProps = _alias.getConnectionProperties(); if (connProps.isEnableConnectionKeepAlive()) { String keepAliveSql = connProps.getKeepAliveSqlStatement(); long sleepMillis = connProps.getKeepAliveSleepTimeSeconds() * 1000; _sessionConnectionKeepAlive = new SessionConnectionKeepAlive(_conn, sleepMillis, keepAliveSql, _alias.getName()); _app.getThreadPool().addTask(_sessionConnectionKeepAlive, "Session Connection Keep-Alive (" + _alias.getName() + ")"); } }