- All Implemented Interfaces:
- java.lang.Cloneable, HasEntityImportance, ProcessableForDataTranslation, IEntity
@Entity
public class AccountBalanceCounter
extends SimpleEntity
Counters used to know when to close the account balance. After each transfer, a counter is included for both
accounts. Then, a polling task will
get accounts with more counters than a threshold, and close its balance. This is not implemented as an update on a
counter because it effectively
hampers concurrency, as all threads affecting a single account are serialized because the database implicitly locks
updated rows.
- Author:
- luis