Examples of CommandRemote


Examples of com.alibaba.wasp.jdbc.command.CommandRemote

  }

  @Override
  public CommandInterface prepareCommand(FClient fClient,String sql, int fetchSize, ReadModel readModel, boolean autoCommit, ExecuteSession statementSession) {
    checkClosed();
    return new CommandRemote(fClient, this, sql, fetchSize, readModel, autoCommit, statementSession, null);
  }
View Full Code Here

Examples of com.alibaba.wasp.jdbc.command.CommandRemote

  }

  @Override
  public CommandInterface prepareCommand(FClient fClient, List<String> sqls, boolean autoCommit, ExecuteSession statementSession) {
    checkClosed();
    return new CommandRemote(fClient, this, sqls, autoCommit, statementSession);
  }
View Full Code Here

Examples of org.h2.command.CommandRemote

        switchOffCluster();
    }

    public synchronized CommandInterface prepareCommand(String sql, int fetchSize) {
        checkClosed();
        return new CommandRemote(this, transferList, sql, fetchSize);
    }
View Full Code Here

Examples of org.h2.command.CommandRemote

        switchOffCluster();
    }

    public synchronized CommandInterface prepareCommand(String sql, int fetchSize) {
        checkClosed();
        return new CommandRemote(this, transferList, sql, fetchSize);
    }
View Full Code Here

Examples of org.h2.command.CommandRemote

    }

    public CommandInterface prepareCommand(String sql, int fetchSize) {
        synchronized (this) {
            checkClosed();
            return new CommandRemote(this, transferList, sql, fetchSize);
        }
    }
View Full Code Here

Examples of org.lealone.command.CommandRemote

    @Override
    public synchronized void flush(Session session) {
        HBaseSession s = (HBaseSession) session;
        if (s.getRegionServer() != null) {
            SessionRemote sr = null;
            CommandRemote cr = null;
            try {
                sr = SessionRemotePool.getMasterSessionRemote(s.getOriginalProperties());
                cr = SessionRemotePool.getCommandRemote(sr, "ALTER SEQUENCE " + getSQL() + " NEXT VALUE MARGIN", null, 1);
                //cr.executeUpdate();
                ResultInterface ri = cr.executeQuery(-1, false);
                ri.next();
                valueWithMargin = ri.currentRow()[0].getLong();
                value = valueWithMargin - increment * cacheSize;
            } catch (Exception e) {
                throw DbException.convert(e);
            } finally {
                SessionRemotePool.release(sr);
                if (cr != null)
                    cr.close();
            }
        } else if (s.getMaster() != null) {
            super.flush(session);
        }
    }
View Full Code Here

Examples of org.lealone.command.CommandRemote

        return getCommandRemote(sessionRemote, sql, prepared.getParameters(), prepared.getFetchSize());
    }

    public static CommandRemote getCommandRemote(SessionRemote sr, String sql, List<Parameter> parameters, int fetchSize) {
        CommandRemote cr = (CommandRemote) sr.prepareCommand(sql, fetchSize);

        //传递最初的参数值到新的CommandRemote
        if (parameters != null) {
            ArrayList<? extends ParameterInterface> newParams = cr.getParameters();
            for (int i = 0, size = parameters.size(); i < size; i++) {
                newParams.get(i).setValue(parameters.get(i).getParamValue(), true);
            }
        }
View Full Code Here

Examples of org.lealone.command.CommandRemote

    }

    @Override
    public synchronized CommandInterface prepareCommand(String sql, int fetchSize) {
        checkClosed();
        return new CommandRemote(this, transferList, sql, fetchSize);
    }
View Full Code Here

Examples of org.lealone.command.CommandRemote

                return updateCount;
            } finally {
            }
        } else {
            SessionRemote sr = null;
            CommandRemote cr = null;
            try {
                sr = SessionRemotePool.getMasterSessionRemote(session.getOriginalProperties());
                cr = SessionRemotePool.getCommandRemote(sr, sql, getParameters(), dc.getFetchSize());
                int updateCount = cr.executeUpdate();
                refreshMetaTable();
                return updateCount;
            } catch (Exception e) {
                throw DbException.convert(e);
            } finally {
                SessionRemotePool.release(sr);
                if (cr != null)
                    cr.close();
            }
        }
    }
View Full Code Here

Examples of org.lealone.command.CommandRemote

                return dc.query(maxRows);
            } finally {
            }
        } else {
            SessionRemote sr = null;
            CommandRemote cr = null;
            try {
                sr = SessionRemotePool.getMasterSessionRemote(session.getOriginalProperties());
                cr = SessionRemotePool.getCommandRemote(sr, sql, getParameters(), dc.getFetchSize());
                ResultInterface ri = cr.executeQuery(maxRows, false);
                refreshMetaTable();
                return ri;
            } catch (Exception e) {
                throw DbException.convert(e);
            } finally {
                SessionRemotePool.release(sr);
                if (cr != null)
                    cr.close();
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.