Package org.apache.cloudstack.managed.context

Examples of org.apache.cloudstack.managed.context.ManagedContextRunnable


                }
            }

            _executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("ConnectionConcierge"));

            _executor.scheduleAtFixedRate(new ManagedContextRunnable() {
                @Override
                protected void runInContext() {
                    s_logger.trace("connection concierge keep alive task");
                    for (Map.Entry<String, ConnectionConcierge> entry : _conns.entrySet()) {
                        ConnectionConcierge concierge = entry.getValue();
View Full Code Here


                    // Set up HTTP connection
                    Socket socket = _serverSocket.accept();
                    final DefaultHttpServerConnection conn = new DefaultHttpServerConnection();
                    conn.bind(socket, _params);

                    _executor.execute(new ManagedContextRunnable() {
                      @Override
                        protected void runInContext() {
                            HttpContext context = new BasicHttpContext(null);
                            try {
                              while(!Thread.interrupted() && conn.isOpen()) {
View Full Code Here

      }
      return null;
    }
   
    private Runnable getClusterPduSendingTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                onSendingClusterPdu();
            }
        };
View Full Code Here

            }
        };
    }
   
    private Runnable getClusterPduNotificationTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                onNotifyingClusterPdu();
            }
        };
View Full Code Here

            try {
                final ClusterServicePdu pdu = popIncomingClusterPdu(1000);
                if(pdu == null)
                  continue;

                _executor.execute(new ManagedContextRunnable() {
                    @Override
                    protected void runInContext() {
                    if(pdu.getPduType() == ClusterServicePdu.PDU_TYPE_RESPONSE) {
                        ClusterServiceRequestPdu requestPdu = popRequestPdu(pdu.getAckSequenceId());
                        if(requestPdu != null) {
View Full Code Here

            }
        }
    }

    private Runnable getHeartbeatTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                TransactionLegacy txn = TransactionLegacy.open("ClusterHeartbeat");
                try {
                    Profiler profiler = new Profiler();
View Full Code Here

            }
        }
    }

    private Runnable getNotificationTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                while(true) {
                    synchronized(_notificationMsgs) {
                        try {
View Full Code Here

        _capacityScanLock.releaseRef();
    }

    private Runnable getCapacityScanTask() {
        return new ManagedContextRunnable() {

            @Override
            protected void runInContext() {
                try {
                    CallContext callContext = CallContext.current();
View Full Code Here

            return _executionRunNumber++;
        }
    }

    private Runnable getExecutorRunnable(final AsyncJob job) {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                long runNumber = getJobRunNumber();

                try {
View Full Code Here

            }
        }
    }

    private Runnable getHeartbeatTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                try {
                    List<SyncQueueItemVO> l = _queueMgr.dequeueFromAny(getMsid(), MAX_ONETIME_SCHEDULE_SIZE);
                    if (l != null && l.size() > 0) {
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.managed.context.ManagedContextRunnable

Copyright © 2018 www.massapicom. 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.