public class RemoteTierProducerAgent extends Object implements TierProducerAgent
TierProducerAgent for the remote tier.| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the agent.
|
boolean |
tryStartNewSegment(TieredStorageSubpartitionId subpartitionId,
int segmentId,
int minNumBuffers)
Try to start a new segment in the Tier.
|
boolean |
tryWrite(TieredStorageSubpartitionId subpartitionId,
Buffer buffer,
Object bufferOwner,
int numRemainingConsecutiveBuffers)
Writes the finished
Buffer to the consumer. |
public boolean tryStartNewSegment(TieredStorageSubpartitionId subpartitionId, int segmentId, int minNumBuffers)
TierProducerAgenttryStartNewSegment 在接口中 TierProducerAgentsubpartitionId - subpartition id that the new segment belongs tosegmentId - id of the new segmentminNumBuffers - the minimum number of buffers that are expected to be written to the
newly created segment.public boolean tryWrite(TieredStorageSubpartitionId subpartitionId, Buffer buffer, Object bufferOwner, int numRemainingConsecutiveBuffers)
TierProducerAgentBuffer to the consumer.
Note that the method is successfully executed (without throwing any exception), the buffer should be released by the caller, otherwise the tier should be responsible to recycle the buffer.
tryWrite 在接口中 TierProducerAgentsubpartitionId - the subpartition id that the buffer is writing tobuffer - the writing bufferbufferOwner - the current owner of this writing buffernumRemainingConsecutiveBuffers - number of buffers that would be passed in the following
invocations and should be written to the same segment as this onepublic void close()
TierProducerAgentNote this only releases resources directly hold by the agent, which excludes resources managed by the resource registry.
close 在接口中 AutoCloseableclose 在接口中 TierProducerAgentCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.