Examples of ManagedContextRunnable


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

        };
    }

    @DB
    private Runnable getGCTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                GlobalLock scanLock = GlobalLock.getInternLock("AsyncJobManagerGC");
                try {
                    if (scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
View Full Code Here

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

    _serverPort = serverPort;
   
    _executor = Executors.newFixedThreadPool(_poolSize, new NamedThreadFactory("Transport-Worker"));
    _connection = new ClientTransportConnection(this);
   
    _executor.execute(new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
        try {
          _connection.connect(_serverAddress, _serverPort);
        } catch(Throwable e) {
View Full Code Here

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

    return false;
  }
 
  @Override
  public void requestSiteOutput(final TransportEndpointSite site) {
    _executor.execute(new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
              try {
          site.processOutput();
          site.ackOutputProcessSignal();
View Full Code Here

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

        return answers[0].getResult();
    }

    private Runnable getTransferScanTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                try {
                    if (s_logger.isTraceEnabled()) {
                        s_logger.trace("Clustered agent transfer scan check, management server id:" + _nodeId);
View Full Code Here

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

        return EnableLB.value();
    }
   
   
    private Runnable getAgentRebalanceScanTask() {
        return new ManagedContextRunnable() {
            @Override
            protected void runInContext() {
                try {
                    if (s_logger.isTraceEnabled()) {
                        s_logger.trace("Agent rebalance task check, management server id:" + _nodeId);
View Full Code Here

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

    }

    private void launchConsoleProxy(final byte[] ksBits, final String ksPassword, final String encryptorPassword) {
        final Object resource = this;
        if (_consoleProxyMain == null) {
            _consoleProxyMain = new Thread(new ManagedContextRunnable() {
                @Override
                protected void runInContext() {
                    try {
                        Class<?> consoleProxyClazz = Class.forName("com.cloud.consoleproxy.ConsoleProxy");
                        try {
View Full Code Here

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

    public void prepareTemplateInAllStoragePools(final VMTemplateVO template, long zoneId) {
        List<StoragePoolVO> pools = _poolDao.listByStatus(StoragePoolStatus.Up);
        for (final StoragePoolVO pool : pools) {
            if (pool.getDataCenterId() == zoneId) {
                s_logger.info("Schedule to preload template " + template.getId() + " into primary storage " + pool.getId());
                _preloadExecutor.execute(new ManagedContextRunnable() {
                    @Override
                    protected void runInContext() {
                        try {
                            reallyRun();
                        } catch (Throwable e) {
View Full Code Here

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

        _capacityScanLock.releaseRef();
    }

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

            @Override
            protected void runInContext() {
              try {
                  CallContext callContext = CallContext.current();
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.