public abstract class ManagedResourceService extends ResourceService
ByteBuffer
s. The application can
create which are exposed for retrieval by remote services.ResourceService.Counters, ResourceService.FetchResourceTask<S,T>, ResourceService.ReadBufferTask, ResourceService.ReadResourceTask, ResourceService.ResourceTypeEnum, ResourceService.StatusEnum
counters, log
Constructor and Description |
---|
ManagedResourceService(InetSocketAddress addr,
int requestServicePoolSize)
Create and start the service.
|
Modifier and Type | Method and Description |
---|---|
DirectBufferPoolAllocator |
getAllocator()
The object used to make, resolve, and release allocations against a
DirectBufferPool . |
protected ByteBuffer |
getBuffer(UUID uuid)
Return
ByteBuffer identified by the UUID . |
void |
shutdown() |
void |
shutdownNow() |
awaitRunning, finalize, getAddr, getResource, isOpen
public ManagedResourceService(InetSocketAddress addr, int requestServicePoolSize) throws IOException
addr
- The IP address and port at which the service will accept
connections. The port MAY be zero to use an ephemeral port.requestServicePoolSize
- The size of the thread pool that will handle requests. When
ZERO (0) a cached thread pool will be used with no specific
size limit.IOException
public DirectBufferPoolAllocator getAllocator()
DirectBufferPool
.public void shutdown()
shutdown
in class ResourceService
public void shutdownNow()
shutdownNow
in class ResourceService
protected ByteBuffer getBuffer(UUID uuid) throws Exception
ByteBuffer
identified by the UUID
.getBuffer
in class ResourceService
ByteBuffer
-or- null
if there is no
buffer associated with that UUID
.Exception
- if the resource may not be served.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.