类 NullLedgerOffloader
java.lang.Object
org.apache.bookkeeper.mledger.impl.NullLedgerOffloader
- 所有已实现的接口:
LedgerOffloader
Null implementation that throws an error on any invokation.
-
嵌套类概要
从接口继承的嵌套类/接口 org.apache.bookkeeper.mledger.LedgerOffloader
LedgerOffloader.OffloadHandle, LedgerOffloader.OffloadResult -
字段概要
字段从接口继承的字段 org.apache.bookkeeper.mledger.LedgerOffloader
METADATA_PULSAR_CLUSTER_NAME, METADATA_SOFTWARE_GITSHA_KEY, METADATA_SOFTWARE_VERSION_KEY -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()Close the resources if necessary.deleteOffloaded(long ledgerId, UUID uid, Map<String, String> offloadDriverMetadata) Delete a ledger from long term storage.Get offload driver name.org.apache.pulsar.common.policies.data.OffloadPoliciesImplGet offload policies of this LedgerOffloader.offload(org.apache.bookkeeper.client.api.ReadHandle ledger, UUID uid, Map<String, String> extraMetadata) Offload the passed in ledger to longterm storage.CompletableFuture<org.apache.bookkeeper.client.api.ReadHandle>readOffloaded(long ledgerId, UUID uid, Map<String, String> offloadDriverMetadata) Create a ReadHandle which can be used to read a ledger back from longterm storage.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.apache.bookkeeper.mledger.LedgerOffloader
deleteOffloaded, getOffloadDriverMetadata, readOffloaded, streamingOffload
-
字段详细资料
-
INSTANCE
-
-
构造器详细资料
-
NullLedgerOffloader
public NullLedgerOffloader()
-
-
方法详细资料
-
getOffloadDriverName
从接口复制的说明:LedgerOffloaderGet offload driver name.- 指定者:
getOffloadDriverName在接口中LedgerOffloader- 返回:
- offload driver name.
-
offload
public CompletableFuture<Void> offload(org.apache.bookkeeper.client.api.ReadHandle ledger, UUID uid, Map<String, String> extraMetadata) 从接口复制的说明:LedgerOffloaderOffload the passed in ledger to longterm storage. Metadata passed in is for inspection purposes only and should be stored alongside the ledger data. When the returned future completes, the ledger has been persisted to the longterm storage, so it is safe to delete the original copy in bookkeeper. The uid is used to identify an attempt to offload. The implementation should use this to deterministically generate a unique name for the offloaded object. This uid will be stored in the managed ledger metadata before attempting the call to offload(). If a subsequent or concurrent call to offload() finds a uid in the metadata, it will attempt to cleanup this attempt with a call to #deleteOffloaded(ReadHandle,UUID). Once the offload attempt completes, the managed ledger will update its metadata again, to record the completion, ensuring that subsequent calls will not attempt to offload the same ledger again.- 指定者:
offload在接口中LedgerOffloader- 参数:
ledger- the ledger to offloaduid- unique id to identity this offload attemptextraMetadata- metadata to be stored with the offloaded ledger for informational purposes- 返回:
- a future, which when completed, denotes that the offload has been successful.
-
readOffloaded
public CompletableFuture<org.apache.bookkeeper.client.api.ReadHandle> readOffloaded(long ledgerId, UUID uid, Map<String, String> offloadDriverMetadata) 从接口复制的说明:LedgerOffloaderCreate a ReadHandle which can be used to read a ledger back from longterm storage. The passed uid, will be match the uid of a previous successful call to #offload(ReadHandle,UUID,Map).- 指定者:
readOffloaded在接口中LedgerOffloader- 参数:
ledgerId- the ID of the ledger to load from longterm storageuid- unique ID for previous successful offload attemptoffloadDriverMetadata- offload driver metadata- 返回:
- a future, which when completed, returns a ReadHandle
-
deleteOffloaded
public CompletableFuture<Void> deleteOffloaded(long ledgerId, UUID uid, Map<String, String> offloadDriverMetadata) 从接口复制的说明:LedgerOffloaderDelete a ledger from long term storage. The passed uid, will be match the uid of a previous call to #offload(ReadHandle,UUID,Map), which may or may not have been successful.- 指定者:
deleteOffloaded在接口中LedgerOffloader- 参数:
ledgerId- the ID of the ledger to delete from longterm storageuid- unique ID for previous offload attemptoffloadDriverMetadata- offload driver metadata- 返回:
- a future, which when completed, signifies that the ledger has been deleted
-
getOffloadPolicies
public org.apache.pulsar.common.policies.data.OffloadPoliciesImpl getOffloadPolicies()从接口复制的说明:LedgerOffloaderGet offload policies of this LedgerOffloader.- 指定者:
getOffloadPolicies在接口中LedgerOffloader- 返回:
- offload policies
-
close
public void close()从接口复制的说明:LedgerOffloaderClose the resources if necessary.- 指定者:
close在接口中LedgerOffloader
-