com.sleepycat.je.rep.utilint
Class ServiceDispatcher.QueuingService
java.lang.Object
com.sleepycat.je.rep.utilint.ServiceDispatcher.QueuingService
- Direct Known Subclasses:
- ServiceDispatcher.LazyQueuingService
- Enclosing class:
- ServiceDispatcher
public class ServiceDispatcher.QueuingService
- extends Object
A service where requests are simply added to the supplied queue. It's
the responsibility of the service creator to drain the queue. This
service is used when the service carries out a long-running dialog with
the service requester. For example, a Feeder service.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceDispatcher.QueuingService
ServiceDispatcher.QueuingService(String serviceName,
BlockingQueue<SocketChannel> queue)
take
SocketChannel take()
throws InterruptedException
- Throws:
InterruptedException
requestDispatch
void requestDispatch(SocketChannel channel)
- Informs the service of a new request. The implementation of the
method must not block.
- Parameters:
channel
- the channel on which the request was made
cancel
void cancel()
- Cancel the service as part of the registration being canceled.
Copyright (c) 2004-2012 Oracle. All rights reserved.