Examples of InstanceState


Examples of com.cburch.logisim.instance.InstanceState

        ArrayList<Value> prevOutputs = null;
        Propagator prop = circState.getPropagator();
        while (true) {
            ArrayList<Value> curOutputs = new ArrayList<Value>();
            for (Instance pin : outputPins) {
                InstanceState pinState = circState.getInstanceState(pin);
                Value val = Pin.FACTORY.getValue(pinState);
                if (pin == haltPin) {
                    halted |= val.equals(Value.TRUE);
                } else if (showTable) {
                    curOutputs.add(val);
View Full Code Here

Examples of com.cburch.logisim.instance.InstanceState

        CircuitAttributes attrs = (CircuitAttributes) superState.getAttributeSet();
        Instance[] pins = attrs.getPinInstances();
        for (int i = 0; i < pins.length; i++) {
            Instance pin = pins[i];
            InstanceState pinState = subState.getInstanceState(pin);
            if (Pin.FACTORY.isInputPin(pin)) {
                Value newVal = superState.getPort(i);
                Value oldVal = Pin.FACTORY.getValue(pinState);
                if (!newVal.equals(oldVal)) {
                    Pin.FACTORY.setValue(pinState, newVal);
                    Pin.FACTORY.propagate(pinState);
                }
            // it is output-only
            } else {
                Value val = pinState.getPort(0);
                superState.setPort(i, val, 1);
            }
        }
    }
View Full Code Here

Examples of com.google.appengine.tools.development.InstanceStateHolder.InstanceState

    if (instance < 0) {
      throw new IllegalStateException("Attempt to send a start request to server/backend "
          + serverOrBackendName + " instance " + instance);
    }

    InstanceState unchangedState =
        instanceStateHolder.testAndSetIf(InstanceState.RUNNING_START_REQUEST,
            InstanceState.SLEEPING);
    if (unchangedState == null) {
      Thread requestThread = new Thread(new Runnable() {
        @Override
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

                modified.incrementAndGet();
                return loadConfig();
            }
        };

        InstanceState       state = new InstanceState(serverList, InstanceStateTypes.NOT_SERVING, new RestartSignificantConfig(null));

        final AtomicBoolean hasBeenCanceled = new AtomicBoolean(false);
        ConfigManager       manager = new ConfigManager(mockExhibitor, provider, 10)
        {
            @Override
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

        ConfigManager                   manager = new ConfigManager(mockExhibitor, provider, 10, MAX_ATTEMPTS);
        manager.start();
        try
        {

            InstanceState                   instanceState = new InstanceState(serverList, InstanceStateTypes.NOT_SERVING, new RestartSignificantConfig(null));
            for ( int i = 0; i < (MAX_ATTEMPTS - 1); ++i )
            {
                manager.checkRollingConfig(instanceState);
                Assert.assertTrue(manager.isRolling());
            }
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

        Mockito.when(mockExhibitor.getRemoteInstanceRequestClient()).thenReturn(mockClient);

        final AtomicLong    modified = new AtomicLong(1);
        ConfigProvider      provider = new ConfigWrapper(modified);

        InstanceState       state = new InstanceState(serverList, InstanceStateTypes.SERVING, new RestartSignificantConfig(null));

        ConfigManager       manager = new ConfigManager(mockExhibitor, provider, 10);
        manager.start();
        try
        {
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

                modified.incrementAndGet();
                return loadConfig();
            }
        };

        InstanceState       state = new InstanceState(serverList, InstanceStateTypes.SERVING, new RestartSignificantConfig(null));

        ConfigManager       manager = new ConfigManager(mockExhibitor, provider, 10);
        manager.start();
        try
        {
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

                modified.incrementAndGet();
                return loadConfig();
            }
        };

        InstanceState       state = new InstanceState(serverList, InstanceStateTypes.SERVING, new RestartSignificantConfig(null));

        ConfigManager       manager = new ConfigManager(mockExhibitor, provider, 10);
        manager.start();
        try
        {
View Full Code Here

Examples of com.netflix.exhibitor.core.state.InstanceState

            // we're done - switch back to single config
            return new ConfigCollectionImpl(config.getRollingConfig(), null);
        }

        ConfigCollection                newCollection = new ConfigCollectionImpl(config.getRootConfig(), config.getRollingConfig(), rollingHostNames, rollingHostNamesIndex + 1);
        RollingReleaseState             state = new RollingReleaseState(new InstanceState(), newCollection);
        if ( state.getCurrentRollingHostname().equals(exhibitor.getThisJVMHostname()) )
        {
            return newCollection;
        }
View Full Code Here

Examples of io.fathom.cloud.compute.api.aws.ec2.model.InstanceState

        CloudModel.InstanceState state = instanceInfo.getInstanceState();
        return buildInstanceState(state);
    }

    protected InstanceState buildInstanceState(CloudModel.InstanceState state) {
        InstanceState instanceState = new InstanceState();
        switch (state) {
        case PENDING:
            instanceState.code = 0;
            instanceState.name = "pending";
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.