Examples of State


Examples of org.apache.beehive.netui.tools.testrecorder.server.state.State

                    "ERROR: unable to find the webapp config for webapp name( " + webappName + " )" );
        }
        if ( log.isInfoEnabled() ) {
            log.debug( "webapp( " + webapp + " )" );
        }
        state = new State();
        state.setTestMode( webapp.isTestMode() );
    }
View Full Code Here

Examples of org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State

        bk.mainWorkerPool.submitOrdered(ledgerId, new SafeRunnable() {
            @Override
            public void safeRun() {
                final long prevLastEntryId;
                final long prevLength;
                final State prevState;
                List<PendingAddOp> pendingAdds;

                synchronized(LedgerHandle.this) {
                    // if the metadata is already closed, we don't need to proceed the process
                    // otherwise, it might end up encountering bad version error log messages when updating metadata
                    if (metadata.isClosed()) {
                        cb.closeComplete(BKException.Code.OK, LedgerHandle.this, ctx);
                        return;
                    }
                    prevState = metadata.getState();
                    prevLastEntryId = metadata.getLastEntryId();
                    prevLength = metadata.getLength();

                    // drain pending adds first
                    pendingAdds = drainPendingAddsToErrorOut();

                    // synchronized on LedgerHandle.this to ensure that
                    // lastAddPushed can not be updated after the metadata
                    // is closed.
                    metadata.setLength(length);
                    metadata.close(lastAddConfirmed);
                    lastAddPushed = lastAddConfirmed;
                }

                // error out all pending adds during closing, the callbacks shouldn't be
                // running under any bk locks.
                errorOutPendingAdds(rc, pendingAdds);

                if (LOG.isDebugEnabled()) {
                    LOG.debug("Closing ledger: " + ledgerId + " at entryId: "
                              + metadata.getLastEntryId() + " with this many bytes: " + metadata.getLength());
                }

                final class CloseCb extends OrderedSafeGenericCallback<Void> {
                    CloseCb() {
                        super(bk.mainWorkerPool, ledgerId);
                    }

                    @Override
                    public void safeOperationComplete(final int rc, Void result) {
                        if (rc == BKException.Code.MetadataVersionException) {
                            rereadMetadata(new OrderedSafeGenericCallback<LedgerMetadata>(bk.mainWorkerPool,
                                                                                          ledgerId) {
                                @Override
                                public void safeOperationComplete(int newrc, LedgerMetadata newMeta) {
                                    if (newrc != BKException.Code.OK) {
                                        LOG.error("Error reading new metadata from ledger " + ledgerId
                                                  + " when closing, code=" + newrc);
                                        cb.closeComplete(rc, LedgerHandle.this, ctx);
                                    } else {
                                        metadata.setState(prevState);
                                        if (prevState.equals(State.CLOSED)) {
                                            metadata.close(prevLastEntryId);
                                        }

                                        metadata.setLength(prevLength);
                                        if (!metadata.isNewerThan(newMeta)
View Full Code Here

Examples of org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State

    }

  private void registerAndEnableZone() {
    ZoneEntity zone = service.registerZone("47547648", "lab","owner", null, new HashMap<String, String>());
    State state = zone.getState();
    System.out.println("state:"+state);
    boolean result = zone.enable();
    System.out.println("result:"+result);

  }
View Full Code Here

Examples of org.apache.commons.httpclient.State

    XMLResponseMethodBase test1 = new XMLResponseMethodBase();
    InputStream data = new ByteArrayInputStream(responseBody.getBytes());
    test1.setStatusCode(WebdavStatus.SC_MULTI_STATUS);
    test1.parseResponse(data);
    test1.setUsed();
    test1.setState(new State());
   
    Enumeration responses = test1.getResponses();
    while (responses.hasMoreElements()) {
        ResponseEntity response = (ResponseEntity) responses.nextElement();
        String href = response.getHref();
View Full Code Here

Examples of org.apache.commons.scxml.model.State

   
    public void testSerializeSCXMLNoStates() {
        SCXML scxml = new SCXML();
        scxml.setVersion("version1");
        scxml.setInitialstate("off");
        scxml.addChild(new State());
       
        String assertValue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
            + "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" version=\"version1\" "
            + "initialstate=\"off\">\n <state>\n </state>\n</scxml>\n";
       
View Full Code Here

Examples of org.apache.commons.scxml2.model.State

        for (EnterableState es : states) {
            es.setObservableId(nextObservableId++);
            if (es instanceof TransitionalState) {
                TransitionalState ts = (TransitionalState)es;
                if (ts instanceof State) {
                    State s = (State)ts;
                    if (s.getInitial() != null && s.getInitial().getTransition() != null) {
                        s.getInitial().getTransition().setObservableId(nextObservableId++);
                    }
                }
                for (Transition t : ts.getTransitionsList()) {
                    t.setObservableId(nextObservableId++);
                }
View Full Code Here

Examples of org.apache.crunch.hadoop.mapreduce.lib.jobcontrol.CrunchControlledJob.State

    }
    CrunchControlledJob pred = null;
    int n = this.dependingJobs.size();
    for (int i = 0; i < n; i++) {
      pred = this.dependingJobs.get(i);
      State s = pred.checkState();
      if (s == State.WAITING || s == State.READY || s == State.RUNNING) {
        break; // a pred is still not completed, continue in WAITING
        // state
      }
      if (s == State.FAILED || s == State.DEPENDENT_FAILED) {
View Full Code Here

Examples of org.apache.geronimo.kernel.management.State

     */
    public final void start() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        // Move to the starting state
        State originalState;
        synchronized (this) {
            originalState = getStateInstance();
            if (originalState == State.RUNNING) {
                return;
            }
View Full Code Here

Examples of org.apache.gora.persistency.State

            if (o instanceof StatefulMap) {
              StatefulMap map = (StatefulMap) o;
              Set<?> es = map.states().entrySet();
              for (Object entry : es) {
                Object mapKey = ((Entry) entry).getKey();
                State state = (State) ((Entry) entry).getValue();
 
                switch (state) {
                  case NEW:
                  case DIRTY:
                    m.put(col.getFirst(), new Text(toBytes(mapKey)), new Value(toBytes(map.get(mapKey))));
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.RegionState.State

      // Possibility of disable flow removing from RIT.
      synchronized (regionsInTransition) {
        state = regionsInTransition.get(encodedName);
        if (state != null) {
          // remove only if the state is PENDING_CLOSE or CLOSING
          State presentState = state.getState();
          if (presentState == State.PENDING_CLOSE
              || presentState == State.CLOSING) {
            this.regionsInTransition.remove(encodedName);
          }
        }
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.