public class PagedService extends Object
PagedService
is used for providing page related RESTful API service.Constructor and Description |
---|
PagedService(CacheManager cacheManager)
PagedService is used for providing page related RESTful API service. |
Modifier and Type | Method and Description |
---|---|
io.netty.buffer.ByteBuf |
getPage(String fileId,
long pageIndex,
io.netty.channel.Channel channel)
Get page bytes given fileId, pageIndex, and channel which is used for allocating ByteBuf.
|
io.netty.channel.FileRegion |
getPageFileRegion(String fileId,
long pageIndex)
Get
FileRegion object given fileId, pageIndex, and channel. |
@Inject public PagedService(CacheManager cacheManager)
PagedService
is used for providing page related RESTful API service.cacheManager
- The interface for managing cached pagespublic io.netty.buffer.ByteBuf getPage(String fileId, long pageIndex, io.netty.channel.Channel channel)
fileId
- the file IDpageIndex
- the page indexchannel
- the Netty channel which is used for allocating ByteBufpublic io.netty.channel.FileRegion getPageFileRegion(String fileId, long pageIndex) throws PageNotFoundException
FileRegion
object given fileId, pageIndex, and channel.fileId
- the file IDpageIndex
- the page indexPageNotFoundException
Copyright © 2023. All Rights Reserved.