Package com.facebook.presto.jdbc.internal.jetty.util

Examples of com.facebook.presto.jdbc.internal.jetty.util.Callback


    /* ------------------------------------------------------------ */
    /** Call to signal that a read is now possible.
     */
    public void fillable()
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
            callback.succeeded();
    }
View Full Code Here


    /* ------------------------------------------------------------ */
    /** Call to signal a failure to a registered interest
     */
    public void onFail(Throwable cause)
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
            callback.failed(cause);
    }
View Full Code Here

    }
   
    /* ------------------------------------------------------------ */
    public void onClose()
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
            callback.failed(new ClosedChannelException());
    }
View Full Code Here

            {
                callback.succeeded();
            }
            else
            {
                Callback partial = new Callback.Adapter()
                {
                    @Override
                    public void failed(Throwable x)
                    {
                        callback.failed(x);
View Full Code Here

        }

        @Override
        void onEnter(final AbstractConnection connection)
        {
            Callback callback=new Callback()
            {
                @Override
                public void succeeded()
                {
                    while(true)
View Full Code Here

    /* ------------------------------------------------------------ */
    /** Call to signal that a read is now possible.
     */
    public void fillable()
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
            callback.succeeded();
    }
View Full Code Here

    /** Call to signal a failure to a registered interest
     * @return true if the cause was passed to a {@link Callback} instance
     */
    public boolean onFail(Throwable cause)
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
        {
            callback.failed(cause);
            return true;
        }
        return false;
    }
View Full Code Here

    }
   
    /* ------------------------------------------------------------ */
    public void onClose()
    {
        Callback callback=_interested.get();
        if (callback!=null && _interested.compareAndSet(callback,null))
            callback.failed(new ClosedChannelException());
    }
View Full Code Here

        }

        @Override
        void onEnter(final AbstractConnection connection)
        {
            Callback callback=new Callback()
            {
                @Override
                public void succeeded()
                {
                    while(true)
View Full Code Here

        }

        @Override
        void onEnter(final AbstractConnection connection)
        {
            Callback callback=new Callback()
            {
                @Override
                public void succeeded()
                {
                    while(true)
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.jetty.util.Callback

Copyright © 2018 www.massapicom. 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.