All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zeroc.IceInternal.ThreadPoolCurrent Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

package com.zeroc.IceInternal;

public final class ThreadPoolCurrent
{
    ThreadPoolCurrent(Instance instance, ThreadPool threadPool, ThreadPool.EventHandlerThread thread)
    {
        operation = SocketOperation.None;
        stream = new com.zeroc.Ice.InputStream(instance, Protocol.currentProtocolEncoding);

        _threadPool = threadPool;
        _thread = thread;
        _ioCompleted = false;
        _leader = false;
    }

    public int operation;
    public com.zeroc.Ice.InputStream stream; // A per-thread stream to be used by event handlers for optimization.

    public boolean
    ioReady()
    {
        return (_handler._registered & operation) > 0;
    }

    public void
    ioCompleted()
    {
        _threadPool.ioCompleted(this);
    }

    public void
    dispatchFromThisThread(DispatchWorkItem workItem)
    {
        _threadPool.dispatchFromThisThread(workItem);
    }

    final ThreadPool _threadPool;
    final ThreadPool.EventHandlerThread _thread;
    EventHandler _handler;
    boolean _ioCompleted;
    boolean _leader;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy