com.sleepycat.je.rep.utilint
Class ServiceDispatcher.QueuingService

java.lang.Object
  extended by 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.


Constructor Summary
ServiceDispatcher.QueuingService(String serviceName, BlockingQueue<SocketChannel> queue)
           
 
Method Summary
(package private)  void cancel()
          Cancel the service as part of the registration being canceled.
(package private)  void requestDispatch(SocketChannel channel)
          Informs the service of a new request.
(package private)  SocketChannel take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDispatcher.QueuingService

ServiceDispatcher.QueuingService(String serviceName,
                                 BlockingQueue<SocketChannel> queue)
Method Detail

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-2010 Oracle. All rights reserved.