public class PageSubscriptionCounterImpl extends Object implements PageSubscriptionCounter
Constructor and Description |
---|
PageSubscriptionCounterImpl(StorageManager storage,
PageSubscription subscription,
Executor executor,
boolean persistent,
long subscriptionID) |
Modifier and Type | Method and Description |
---|---|
void |
addInc(long id,
int variance) |
void |
applyIncrementOnTX(Transaction tx,
long recordID1,
int add)
This method will install the TXs
|
protected void |
cleanup()
This method should always be called from a single threaded executor
|
void |
cleanupNonTXCounters(long pageID)
Cleanup temporary page counters on non transactional paged messages
|
void |
delete() |
void |
delete(Transaction tx) |
long |
getValue() |
long |
getValueAdded() |
void |
increment(Transaction tx,
int add) |
void |
incrementProcessed(long id,
int add) |
void |
loadInc(long id,
int add) |
void |
loadValue(long recordID1,
long value1) |
void |
pendingCounter(Page page,
int increment)
This is used only on non transactional paging
|
void |
processReload()
This will process the reload
|
void |
setPersistent(boolean persistent)
used on testing only
|
public PageSubscriptionCounterImpl(StorageManager storage, PageSubscription subscription, Executor executor, boolean persistent, long subscriptionID)
public long getValueAdded()
getValueAdded
in interface PageSubscriptionCounter
public long getValue()
getValue
in interface PageSubscriptionCounter
public void pendingCounter(Page page, int increment) throws Exception
pendingCounter
in interface PageSubscriptionCounter
page
- increment
- Exception
public void cleanupNonTXCounters(long pageID) throws Exception
cleanupNonTXCounters
in interface PageSubscriptionCounter
pageID
- Exception
public void increment(Transaction tx, int add) throws Exception
increment
in interface PageSubscriptionCounter
Exception
public void applyIncrementOnTX(Transaction tx, long recordID1, int add)
applyIncrementOnTX
in interface PageSubscriptionCounter
tx
- recordID1
- add
- public void loadValue(long recordID1, long value1)
loadValue
in interface PageSubscriptionCounter
public void incrementProcessed(long id, int add)
public void delete() throws Exception
delete
in interface PageSubscriptionCounter
Exception
public void delete(Transaction tx) throws Exception
delete
in interface PageSubscriptionCounter
Exception
public void loadInc(long id, int add)
loadInc
in interface PageSubscriptionCounter
public void processReload()
PageSubscriptionCounter
processReload
in interface PageSubscriptionCounter
public void addInc(long id, int variance)
addInc
in interface PageSubscriptionCounter
public void setPersistent(boolean persistent)
protected void cleanup()
Copyright © 2017 JBoss by Red Hat. All rights reserved.