Examples of OCommandResultListener


Examples of com.orientechnologies.orient.core.command.OCommandResultListener

          final StringBuilder empty = new StringBuilder();
          final Set<ODocument> recordsToSend = new HashSet<ODocument>();
          final int txId = lastClientTxId;

          final Map<String, Integer> fetchPlan = query != null ? OFetchHelper.buildFetchPlan(query.getFetchPlan()) : null;
          command.setResultListener(new OCommandResultListener() {
            @Override
            public boolean result(final Object iRecord) {
              if (empty.length() == 0)
                try {
                  sendOk(txId);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<String> columns = new ArrayList<String>();

    final int limit = Integer.parseInt((String) properties.get("limit"));

    long start = System.currentTimeMillis();
    currentDatabase.query(new OSQLAsynchQuery<ODocument>(iQueryText, limit, new OCommandResultListener() {
      public boolean result(final Object iRecord) {
        final OIdentifiable record = (OIdentifiable) iRecord;

        dumpRecordInTable(currentResultSet.size(), record, columns);
        currentResultSet.add(record);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<String> columns = new ArrayList<String>();

    final int limit = Integer.parseInt((String) properties.get("limit"));

    long start = System.currentTimeMillis();
    currentDatabase.query(new OSQLAsynchQuery<ODocument>(iQueryText, limit, new OCommandResultListener() {
      public boolean result(final Object iRecord) {
        final ORecordSchemaAwareAbstract<?> record = (ORecordSchemaAwareAbstract<?>) iRecord;

        dumpRecordInTable(currentResultSet.size(), record, columns);
        currentResultSet.add(record);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

        final StringBuilder empty = new StringBuilder();
        final Set<ODocument> recordsToSend = new HashSet<ODocument>();
        final int txId = lastClientTxId;

        final Map<String, Integer> fetchPlan = query != null ? OFetchHelper.buildFetchPlan(query.getFetchPlan()) : null;
        command.setResultListener(new OCommandResultListener() {
          @Override
          public boolean result(final Object iRecord) {
            if (empty.length() == 0)
              try {
                sendOk(txId);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

          final StringBuilder empty = new StringBuilder();
          final Set<ODocument> recordsToSend = new HashSet<ODocument>();
          final int txId = lastClientTxId;

          final Map<String, Integer> fetchPlan = query != null ? OFetchHelper.buildFetchPlan(query.getFetchPlan()) : null;
          command.setResultListener(new OCommandResultListener() {
            @Override
            public boolean result(final Object iRecord) {
              if (empty.length() == 0)
                try {
                  sendOk(txId);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<String> columns = new ArrayList<String>();

    final int limit = Integer.parseInt((String) properties.get("limit"));

    long start = System.currentTimeMillis();
    currentDatabase.query(new OSQLAsynchQuery<ODocument>(iQueryText, limit, new OCommandResultListener() {
      public boolean result(final Object iRecord) {
        final OIdentifiable record = (OIdentifiable) iRecord;

        dumpRecordInTable(currentResultSet.size(), record, columns);
        currentResultSet.add(record);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<String> columns = new ArrayList<String>();

    final int limit = Integer.parseInt((String) properties.get("limit"));

    long start = System.currentTimeMillis();
    currentDatabase.query(new OSQLAsynchQuery<ODocument>(iQueryText, limit, new OCommandResultListener() {
      public boolean result(final Object iRecord) {
        final ORecordSchemaAwareAbstract<?> record = (ORecordSchemaAwareAbstract<?>) iRecord;

        dumpRecordInTable(currentResultSet.size(), record, columns);
        currentResultSet.add(record);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

          final StringBuilder empty = new StringBuilder();
          final Set<ODocument> recordsToSend = new HashSet<ODocument>();
          final int txId = lastClientTxId;

          final Map<String, Integer> fetchPlan = query != null ? OFetchHelper.buildFetchPlan(query.getFetchPlan()) : null;
          command.setResultListener(new OCommandResultListener() {
            @Override
            public boolean result(final Object iRecord) {
              if (empty.length() == 0)
                try {
                  sendOk(txId);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<ODocument> asynchResultOne = new ArrayList<ODocument>();
    final List<ODocument> asynchResultTwo = new ArrayList<ODocument>();
    final AtomicBoolean endOneCalled = new AtomicBoolean();
    final AtomicBoolean endTwoCalled = new AtomicBoolean();

    database.command(new OSQLAsynchQuery<ODocument>(sqlOne, new OCommandResultListener() {
      @Override
      public boolean result(Object iRecord) {
        asynchResultOne.add((ODocument) iRecord);
        return true;
      }

      @Override
      public void end() {
        endOneCalled.set(true);

        database.command(new OSQLAsynchQuery<ODocument>(sqlTwo, new OCommandResultListener() {
          @Override
          public boolean result(Object iRecord) {
            asynchResultTwo.add((ODocument) iRecord);
            return true;
          }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandResultListener

    final List<ODocument> asynchResultOne = new ArrayList<ODocument>();
    final List<ODocument> asynchResultTwo = new ArrayList<ODocument>();
    final AtomicBoolean endOneCalled = new AtomicBoolean();
    final AtomicBoolean endTwoCalled = new AtomicBoolean();

    database.command(new OSQLAsynchQuery<ODocument>(sqlOne, new OCommandResultListener() {
      @Override
      public boolean result(Object iRecord) {
        asynchResultOne.add((ODocument) iRecord);
        return asynchResultOne.size() < synchResultOne.size() / 2;
      }

      @Override
      public void end() {
        endOneCalled.set(true);

        database.command(new OSQLAsynchQuery<ODocument>(sqlTwo, new OCommandResultListener() {
          @Override
          public boolean result(Object iRecord) {
            asynchResultTwo.add((ODocument) iRecord);
            return true;
          }
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.