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 |
applyIncrement(Transaction tx,
long recordID1,
int add)
This method will install the prepared TXs
|
protected void |
cleanup()
This method should always be called from a single threaded executor
|
void |
delete() |
void |
delete(Transaction tx) |
long |
getValue() |
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 |
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 getValue()
getValue
in interface PageSubscriptionCounter
public void increment(Transaction tx, int add) throws Exception
increment
in interface PageSubscriptionCounter
Exception
public void applyIncrement(Transaction tx, long recordID1, int add)
applyIncrement
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 © 2013 JBoss by Red Hat. All Rights Reserved.