|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.objectweb.jotm.examples.ListenerImpl
|
+--org.objectweb.jotm.examples.AccountImpl
Simple implementation of a bank account. It uses transactional locks and can take
part in transactions since it extends ListenerImpl.
| Constructor Summary | |
AccountImpl()
|
|
| Method Summary | |
int |
balance()
Gets account balance. |
void |
commit()
|
void |
deposit(int value)
Deposits an amount of money to the bank account. |
void |
one_phase_commit()
|
void |
withdraw(int value)
Withdraws an amount of money from the bank account. |
| Methods inherited from class org.objectweb.jotm.examples.ListenerImpl |
abort, before_completion, handleEvent, prepare |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccountImpl()
| Method Detail |
public int balance()
Account
balance in interface Accountpublic void deposit(int value)
Account
deposit in interface Accountvalue - value representing the amount of moneypublic void withdraw(int value)
Account
withdraw in interface Accountvalue - value representing the amount of moneypublic void one_phase_commit()
one_phase_commit in class ListenerImplpublic void commit()
commit in class ListenerImpl
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||