Examples of Stack


Examples of org.apache.ambari.server.state.Stack

 
  @Test
  public void testGetStacksNames() throws Exception {
    Set<Stack> stackNames = metaInfo.getStackNames();
    assertEquals(stackNames.size(), STACKS_NAMES_CNT);
    assertTrue(stackNames.contains(new Stack(STACK_NAME_HDP)));
  }
View Full Code Here

Examples of org.apache.lenya.util.Stack

            getLogger().debug("request-uri=" + request_uri);
            getLogger().debug("sitemap-uri=" + sitemap_uri);
        }

        // Set history
        Stack history = (Stack) session.getAttribute("org.apache.lenya.cms.cocoon.acting.History");

        if (history == null) {
            history = new Stack(10);
            session.setAttribute("org.apache.lenya.cms.cocoon.acting.History", history);
        }

        history.push(sitemap_uri);

        // Check public uris from configuration above. Should only be used during development before the implementation of a concrete authorizer.
        for (int i = 0; i < public_matchers.length; i++) {
            if (preparedMatch(public_matchers[i], sitemap_uri)) {
                if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.apache.mina.util.Stack

    /**
     * Allocate or get the buffer which is capable of the specified size.
     */
    private static ByteBuffer allocate(int idx) {
        Stack stack = bufferStacks[idx];

        ByteBuffer buf;
        synchronized (stack) {
            buf = (ByteBuffer) stack.pop();
            if (buf == null) {
                buf = createBuffer(bufferStackSizes[idx]);
            }
        }

View Full Code Here

Examples of org.apache.openejb.util.Stack

     */
    public Object getInstance(ThreadContext callContext)
            throws OpenEJBException {
        CoreDeploymentInfo deploymentInfo = callContext.getDeploymentInfo();
        Data data = (Data) deploymentInfo.getContainerData();
        Stack pool = data.getPool();
       
        if(strictPooling){
          boolean acquired;
            try {
              if(timeout.getTime() <= 0L){
                data.getSemaphore().acquire();
                acquired = true;
              } else {
                    acquired = data.getSemaphore().tryAcquire(timeout.getTime(),timeout.getUnit());
              }
            } catch (InterruptedException e2) {
                throw new OpenEJBException("Unexpected Interruption of current thread: ",e2);
            }
            if(!acquired){
              throw new IllegalStateException("An invocation of the Stateless Session Bean "+deploymentInfo.getEjbName()+" has timed-out");
            }
        }
        Object bean = pool.pop();

        if (bean == null) {

            Class beanClass = deploymentInfo.getBeanClass();
            ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
View Full Code Here

Examples of org.exolab.castor.util.Stack

        _config          = LocalConfiguration.getInstance();
        _debug           = enableDebug;
        _namespaces      = new Namespaces();
        _packages        = new List(3);
        _cdResolver      = new ClassDescriptorResolverImpl();
        _parents         = new Stack();
        _validate        = _config.marshallingValidation();
        _naming          = XMLNaming.getInstance();
        _processingInstructions = new List(3);
        _attributes      = new AttributesImpl();
        _topLevelAtts    = new AttributeSetImpl();
View Full Code Here

Examples of org.geotools.graph.util.Stack

*/
public class DirectedDepthFirstTopologicalIterator
  extends DirectedBreadthFirstTopologicalIterator {
 
  protected Queue buildQueue(Graph graph) {
    return(new Stack(graph.getNodes().size()));
  }
View Full Code Here

Examples of org.jacorb.util.Stack

           When the encapsulation is closed, this value will be restored as
           index */

        if (encaps_stack == null)
        {
            encaps_stack = new Stack();
        }
        encaps_stack.push(new EncapsInfo(old_endian, index, pos, size ));

        openEncapsulatedArray();

View Full Code Here

Examples of test.dbc.stack.Stack

  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
View Full Code Here

Examples of test.dbc.stack.Stack

  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
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.