Examples of ODistributedResponse


Examples of com.orientechnologies.orient.server.distributed.ODistributedResponse

          "No nodes configured for partition '%s.%s' request: %s", iDatabaseName, iClusterNames, req);
      throw new ODistributedException("No nodes configured for partition '" + iDatabaseName + "." + iClusterNames + "' request: "
          + req);
    }

    final ODistributedResponse response = db.send2Nodes(req, iClusterNames, iTargetNodes, iExecutionMode);
    if (response != null)
      return response.getPayload();

    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.server.distributed.ODistributedResponse

      @Override
      public void run() {
        Thread.currentThread().setName("OrientDB Node Response " + queueName);
        while (running) {
          String senderNode = null;
          ODistributedResponse message = null;
          try {
            message = nodeResponseQueue.take();

            if (message != null) {
              senderNode = message.getSenderNodeName();
              final long responseTime = dispatchResponseToThread(message);

              if (responseTime > -1)
                collectMetric(responseTime);
            }

          } catch (InterruptedException e) {
            // EXIT CURRENT THREAD
            Thread.interrupted();
            break;
          } catch (DistributedObjectDestroyedException e) {
            Thread.interrupted();
            break;
          } catch (HazelcastInstanceNotActiveException e) {
            Thread.interrupted();
            break;
          } catch (HazelcastException e) {
            if (e.getCause() instanceof InterruptedException)
              Thread.interrupted();
            else
              ODistributedServerLog.error(this, manager.getLocalNodeName(), senderNode, DIRECTION.IN,
                  "error on reading distributed response", e, message != null ? message.getPayload() : "-");
          } catch (Throwable e) {
            ODistributedServerLog.error(this, manager.getLocalNodeName(), senderNode, DIRECTION.IN,
                "error on reading distributed response", e, message != null ? message.getPayload() : "-");
          }
        }

        ODistributedServerLog.debug(this, manager.getLocalNodeName(), null, DIRECTION.NONE, "end of reading responses");
      }
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.