Examples of Reentrant


Examples of org.glassfish.grizzly.Writer.Reentrant

        }
       
        this.handler = handler;
       
        if (isNonBlockingWriteGuaranteed || canWrite()) {
            final Reentrant reentrant = Reentrant.getWriteReentrant();
            if (!reentrant.isMaxReentrantsReached()) {
                notifyWritePossible();
            } else {
                notifyWritePossibleAsync();
            }
           
View Full Code Here

Examples of org.glassfish.grizzly.Writer.Reentrant

     */
    private void notifyWritePossible() {
        final WriteHandler localHandler = handler;

        if (localHandler != null) {
            final Reentrant reentrant = Reentrant.getWriteReentrant();
           
            try {
                handler = null;
                reentrant.inc();

                isNonBlockingWriteGuaranteed = true;

                localHandler.onWritePossible();
            } catch (Throwable t) {
                localHandler.onError(t);
            } finally {
                reentrant.dec();
            }
        }
    }
View Full Code Here

Examples of org.glassfish.grizzly.Writer.Reentrant


        private static void onWritePossible0(final OutputBuffer ob)
                throws Exception {
            try {
                final Reentrant reentrant = Reentrant.getWriteReentrant();
                if (!reentrant.isMaxReentrantsReached()) {
                    ob.notifyWritePossible();
                } else {
                    ob.notifyWritePossibleAsync();
                }
            } catch (Exception ignored) {
View Full Code Here

Examples of org.glassfish.grizzly.Writer.Reentrant

        }
       
        this.handler = handler;
       
        if (isNonBlockingWriteGuaranteed || canWrite()) {
            final Reentrant reentrant = Reentrant.getWriteReentrant();
            if (!reentrant.isMaxReentrantsReached()) {
                notifyWritePossible();
            } else {
                notifyWritePossibleAsync();
            }
           
View Full Code Here

Examples of org.glassfish.grizzly.Writer.Reentrant

     */
    private void notifyWritePossible() {
        final WriteHandler localHandler = handler;

        if (localHandler != null) {
            final Reentrant reentrant = Reentrant.getWriteReentrant();
           
            try {
                handler = null;
                reentrant.inc();

                isNonBlockingWriteGuaranteed = true;

                localHandler.onWritePossible();
            } catch (Throwable t) {
                localHandler.onError(t);
            } finally {
                reentrant.dec();
            }
        }
    }
View Full Code Here

Examples of org.glassfish.grizzly.Writer.Reentrant


        private static void onWritePossible0(final OutputBuffer ob)
                throws Exception {
            try {
                final Reentrant reentrant = Reentrant.getWriteReentrant();
                if (!reentrant.isMaxReentrantsReached()) {
                    ob.notifyWritePossible();
                } else {
                    ob.notifyWritePossibleAsync();
                }
            } catch (Exception ignored) {
View Full Code Here

Examples of org.jboss.test.jca.interfaces.Reentrant

   }

   public void testReentrantConnectionCaching() throws Exception
   {
      ReentrantHome rh = (ReentrantHome)new InitialContext().lookup("/ejb/jca/Reentrant");
      Reentrant r1 = rh.create(new Integer(0), null);
      rh.create(new Integer(1), r1);
   }
View Full Code Here

Examples of org.jboss.test.jca.interfaces.Reentrant

    * @exception RemoteException if an error occurs
    */
   public void ejbPostCreate(Integer id, Reentrant other) throws CreateException, RemoteException
   {
      this.id = id;
      Reentrant me = (Reentrant) ctx.getEJBObject();
      Connection c = null;
      try
      {
         try
         {
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.