Class PageSubscriptionCounterImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.paging.cursor.impl.BasePagingCounter
-
- org.apache.activemq.artemis.core.paging.cursor.impl.PageSubscriptionCounterImpl
-
- All Implemented Interfaces:
PageSubscriptionCounter
public class PageSubscriptionCounterImpl extends BasePagingCounter
This class will encapsulate the persistent counters for the PagingSubscription
-
-
Constructor Summary
Constructors Constructor Description PageSubscriptionCounterImpl(StorageManager storage, long subscriptionID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyIncrementOnTX(Transaction tx, int add, long size)This method will install the TXsvoiddelete()voiddelete(Transaction tx)voidfinishRebuild()longgetPersistentSize()longgetPersistentSizeAdded()longgetValue()longgetValueAdded()voidincrement(Transaction tx, int add, long size)voidloadInc(long id, int add, long size)voidloadValue(long recordID, long value, long size)voidmarkRebuilding()voidprocessReload()This will process the reloadPageSubscriptionCountersetSubscription(PageSubscription subscription)voidsnapshot()This method should always be called from a single threaded executor-
Methods inherited from class org.apache.activemq.artemis.core.paging.cursor.impl.BasePagingCounter
isRebuilding
-
-
-
-
Constructor Detail
-
PageSubscriptionCounterImpl
public PageSubscriptionCounterImpl(StorageManager storage, long subscriptionID)
-
-
Method Detail
-
markRebuilding
public void markRebuilding()
- Specified by:
markRebuildingin interfacePageSubscriptionCounter- Overrides:
markRebuildingin classBasePagingCounter
-
finishRebuild
public void finishRebuild()
- Specified by:
finishRebuildin interfacePageSubscriptionCounter- Overrides:
finishRebuildin classBasePagingCounter
-
getValueAdded
public long getValueAdded()
-
getValue
public long getValue()
-
getPersistentSizeAdded
public long getPersistentSizeAdded()
-
getPersistentSize
public long getPersistentSize()
-
increment
public void increment(Transaction tx, int add, long size) throws Exception
- Throws:
Exception
-
applyIncrementOnTX
public void applyIncrementOnTX(Transaction tx, int add, long size)
This method will install the TXs- Parameters:
tx-add-
-
loadValue
public void loadValue(long recordID, long value, long size)
-
delete
public void delete(Transaction tx) throws Exception
- Throws:
Exception
-
loadInc
public void loadInc(long id, int add, long size)
-
processReload
public void processReload()
Description copied from interface:PageSubscriptionCounterThis will process the reload
-
snapshot
public void snapshot()
This method should always be called from a single threaded executor
-
setSubscription
public PageSubscriptionCounter setSubscription(PageSubscription subscription)
-
-