类 ManagedLedgerFactoryImpl
java.lang.Object
org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl
- 所有已实现的接口:
ManagedLedgerFactory
-
嵌套类概要
嵌套类修饰符和类型类说明static interfaceFactory to create Bookkeeper-client for a given ensemblePlacementPolicy. -
字段概要
字段修饰符和类型字段说明protected final ConcurrentHashMap<String,CompletableFuture<ManagedLedgerImpl>> protected final ManagedLedgerFactoryMBeanImplprotected final ConcurrentHashMap<String,org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.PendingInitializeManagedLedger> protected final org.apache.bookkeeper.common.util.OrderedScheduler -
构造器概要
构造器构造器说明ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.client.BookKeeper bookKeeper) ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.client.BookKeeper bookKeeper, ManagedLedgerFactoryConfig config) ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.conf.ClientConfiguration bkClientConfiguration) ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.conf.ClientConfiguration bkClientConfiguration, ManagedLedgerFactoryConfig config) ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, ManagedLedgerFactoryImpl.BookkeeperFactoryForCustomEnsemblePlacementPolicy bookKeeperGroupFactory, ManagedLedgerFactoryConfig config) ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, ManagedLedgerFactoryImpl.BookkeeperFactoryForCustomEnsemblePlacementPolicy bookKeeperGroupFactory, ManagedLedgerFactoryConfig config, org.apache.bookkeeper.stats.StatsLogger statsLogger) -
方法概要
修饰符和类型方法说明voidasyncDelete(String name, AsyncCallbacks.DeleteLedgerCallback callback, Object ctx) Delete a managed ledger.asyncExists(String ledgerName) Check managed ledger has been initialized before.voidasyncGetManagedLedgerInfo(String name, AsyncCallbacks.ManagedLedgerInfoCallback callback, Object ctx) Asynchronously get the current metadata info for a managed ledger.voidasyncOpen(String name, AsyncCallbacks.OpenLedgerCallback callback, Object ctx) Asynchronous open method.voidasyncOpen(String name, ManagedLedgerConfig config, AsyncCallbacks.OpenLedgerCallback callback, Supplier<Boolean> mlOwnershipChecker, Object ctx) Asynchronous open method.voidasyncOpenReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config, AsyncCallbacks.OpenReadOnlyCursorCallback callback, Object ctx) Open aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.voidDelete a managed ledger.org.apache.bookkeeper.client.BookKeeperlonggetManagedLedgerInfo(String name) Get the current metadata info for a managed ledger.Helper for getting stats.Open a managed ledger.open(String name, ManagedLedgerConfig config) Open a managed ledger.openReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config) Open aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.voidshutdown()Releases all the resources maintained by the ManagedLedgerFactory.This method tries it's best to releases all the resources maintained by the ManagedLedgerFactory.voidupdateCacheEvictionTimeThreshold(long cacheEvictionTimeThresholdNanos) update cache evictionTimeThreshold.
-
字段详细资料
-
scheduledExecutor
protected final org.apache.bookkeeper.common.util.OrderedScheduler scheduledExecutor -
mbean
-
ledgers
-
pendingInitializeLedgers
protected final ConcurrentHashMap<String,org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.PendingInitializeManagedLedger> pendingInitializeLedgers
-
-
构造器详细资料
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.conf.ClientConfiguration bkClientConfiguration) throws Exception - 抛出:
Exception
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.conf.ClientConfiguration bkClientConfiguration, ManagedLedgerFactoryConfig config) throws Exception - 抛出:
Exception
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.client.BookKeeper bookKeeper) throws Exception - 抛出:
Exception
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.bookkeeper.client.BookKeeper bookKeeper, ManagedLedgerFactoryConfig config) throws Exception - 抛出:
Exception
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, ManagedLedgerFactoryImpl.BookkeeperFactoryForCustomEnsemblePlacementPolicy bookKeeperGroupFactory, ManagedLedgerFactoryConfig config) throws Exception - 抛出:
Exception
-
ManagedLedgerFactoryImpl
public ManagedLedgerFactoryImpl(org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, ManagedLedgerFactoryImpl.BookkeeperFactoryForCustomEnsemblePlacementPolicy bookKeeperGroupFactory, ManagedLedgerFactoryConfig config, org.apache.bookkeeper.stats.StatsLogger statsLogger) throws Exception - 抛出:
Exception
-
-
方法详细资料
-
getManagedLedgers
Helper for getting stats.- 返回:
-
open
从接口复制的说明:ManagedLedgerFactoryOpen a managed ledger. If the managed ledger does not exist, a new one will be automatically created. Uses the default configuration parameters.- 指定者:
open在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledger- 返回:
- the managed ledger
- 抛出:
ManagedLedgerExceptionInterruptedException
-
open
public ManagedLedger open(String name, ManagedLedgerConfig config) throws InterruptedException, ManagedLedgerException 从接口复制的说明:ManagedLedgerFactoryOpen a managed ledger. If the managed ledger does not exist, a new one will be automatically created.- 指定者:
open在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledgerconfig- managed ledger configuration- 返回:
- the managed ledger
- 抛出:
ManagedLedgerExceptionInterruptedException
-
asyncOpen
从接口复制的说明:ManagedLedgerFactoryAsynchronous open method.- 指定者:
asyncOpen在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledgercallback- callback objectctx- opaque context- 另请参阅:
-
asyncOpen
public void asyncOpen(String name, ManagedLedgerConfig config, AsyncCallbacks.OpenLedgerCallback callback, Supplier<Boolean> mlOwnershipChecker, Object ctx) 从接口复制的说明:ManagedLedgerFactoryAsynchronous open method.- 指定者:
asyncOpen在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledgerconfig- managed ledger configurationcallback- callback objectmlOwnershipChecker- checks ml-ownership in case updating ml-metadata fails due to ownership conflictctx- opaque context- 另请参阅:
-
openReadOnlyCursor
public ReadOnlyCursor openReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config) throws InterruptedException, ManagedLedgerException 从接口复制的说明:ManagedLedgerFactoryOpen aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.- 指定者:
openReadOnlyCursor在接口中ManagedLedgerFactorystartPosition- set the cursor on that particular position. If setting to `PositionImpl.earliest` it will be positioned on the first available entry.- 返回:
- 抛出:
InterruptedExceptionManagedLedgerException
-
asyncOpenReadOnlyCursor
public void asyncOpenReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config, AsyncCallbacks.OpenReadOnlyCursorCallback callback, Object ctx) 从接口复制的说明:ManagedLedgerFactoryOpen aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.- 指定者:
asyncOpenReadOnlyCursor在接口中ManagedLedgerFactorystartPosition- set the cursor on that particular position. If setting to `PositionImpl.earliest` it will be positioned on the first available entry.
-
shutdownAsync
从接口复制的说明:ManagedLedgerFactoryThis method tries it's best to releases all the resources maintained by the ManagedLedgerFactory. It will take longer time to shutdown than shutdown();- 指定者:
shutdownAsync在接口中ManagedLedgerFactory- 抛出:
ManagedLedgerException- 另请参阅:
-
shutdown
从接口复制的说明:ManagedLedgerFactoryReleases all the resources maintained by the ManagedLedgerFactory. -
asyncExists
从接口复制的说明:ManagedLedgerFactoryCheck managed ledger has been initialized before.- 指定者:
asyncExists在接口中ManagedLedgerFactory- 参数:
ledgerName-String- 返回:
- a future represents the result of the operation.
an instance of
Booleanis returned if the operation succeeds.
-
getManagedLedgerInfo
public ManagedLedgerInfo getManagedLedgerInfo(String name) throws InterruptedException, ManagedLedgerException 从接口复制的说明:ManagedLedgerFactoryGet the current metadata info for a managed ledger.- 指定者:
getManagedLedgerInfo在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledger- 抛出:
InterruptedExceptionManagedLedgerException
-
asyncGetManagedLedgerInfo
public void asyncGetManagedLedgerInfo(String name, AsyncCallbacks.ManagedLedgerInfoCallback callback, Object ctx) 从接口复制的说明:ManagedLedgerFactoryAsynchronously get the current metadata info for a managed ledger.- 指定者:
asyncGetManagedLedgerInfo在接口中ManagedLedgerFactory- 参数:
name- the unique name that identifies the managed ledgercallback- callback objectctx- opaque context
-
delete
从接口复制的说明:ManagedLedgerFactoryDelete a managed ledger. If it's not open, it's metadata will get regardless deleted.- 指定者:
delete在接口中ManagedLedgerFactory- 抛出:
InterruptedExceptionManagedLedgerException
-
asyncDelete
从接口复制的说明:ManagedLedgerFactoryDelete a managed ledger. If it's not open, it's metadata will get regardless deleted.- 指定者:
asyncDelete在接口中ManagedLedgerFactory
-
getMetaStore
-
getConfig
-
getEntryCacheManager
- 指定者:
getEntryCacheManager在接口中ManagedLedgerFactory- 返回:
- return EntryCacheManager.
-
updateCacheEvictionTimeThreshold
public void updateCacheEvictionTimeThreshold(long cacheEvictionTimeThresholdNanos) 从接口复制的说明:ManagedLedgerFactoryupdate cache evictionTimeThreshold.- 指定者:
updateCacheEvictionTimeThreshold在接口中ManagedLedgerFactory- 参数:
cacheEvictionTimeThresholdNanos- time threshold for eviction.
-
getCacheEvictionTimeThreshold
public long getCacheEvictionTimeThreshold()- 指定者:
getCacheEvictionTimeThreshold在接口中ManagedLedgerFactory- 返回:
- time threshold for eviction.
-
getCacheStats
-
getBookKeeper
public org.apache.bookkeeper.client.BookKeeper getBookKeeper()
-