com.sleepycat.je.rep.utilint
Class ServiceDispatcher.LazyQueuingService
java.lang.Object
com.sleepycat.je.rep.utilint.ServiceDispatcher.QueuingService
com.sleepycat.je.rep.utilint.ServiceDispatcher.LazyQueuingService
- Enclosing class:
- ServiceDispatcher
public class ServiceDispatcher.LazyQueuingService
- extends ServiceDispatcher.QueuingService
A queuing service that starts the thread that services the requests
lazily, upon first request and terminates the thread when the service is
unregistered. The thread must be "interrupt aware" and must exit when
it receives an interrupt.
This type of service is suitable for services that are used
infrequently.
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceDispatcher.LazyQueuingService
public ServiceDispatcher.LazyQueuingService(String serviceName,
BlockingQueue<SocketChannel> queue,
Thread serviceThread)
requestDispatch
void requestDispatch(SocketChannel channel)
- Informs the service of a new request. The implementation of the
method must not block.
- Overrides:
requestDispatch
in class ServiceDispatcher.QueuingService
- Parameters:
channel
- the channel on which the request was made
cancel
void cancel()
- Cancel the service as part of the registration being canceled.
- Overrides:
cancel
in class ServiceDispatcher.QueuingService
Copyright (c) 2004-2012 Oracle. All rights reserved.