edu.cuny.cat.market.accepting
Class TransactionBasedAcceptingPolicy
java.lang.Object
edu.cuny.cat.market.AuctioneerPolicy
edu.cuny.cat.market.accepting.ShoutAcceptingPolicy
edu.cuny.cat.market.accepting.OnlyNewShoutDecidingAcceptingPolicy
edu.cuny.cat.market.accepting.TransactionBasedAcceptingPolicy
- All Implemented Interfaces:
- AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
public class TransactionBasedAcceptingPolicy
- extends OnlyNewShoutDecidingAcceptingPolicy
the accepting policy that tracks matched asks and bids and uses lowest
matched bid and highest matched ask to restrict the shouts to be accepted.
This aims to increase the transation success rate.
- Version:
- $Revision: 1.5 $
- Author:
- Jinzhong Niu
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
minDailyAcceptedBid
protected double minDailyAcceptedBid
maxDailyAcceptedAsk
protected double maxDailyAcceptedAsk
lowestBidPrice
protected double lowestBidPrice
highestAskPrice
protected double highestAskPrice
delta
protected double delta
- used to relax the restriction
TransactionBasedAcceptingPolicy
public TransactionBasedAcceptingPolicy()
reset
public void reset()
- Description copied from class:
AuctioneerPolicy
- resets the state to be the same as the policy is created and initialized.
- Specified by:
reset in interface edu.cuny.obj.Resetable- Overrides:
reset in class AuctioneerPolicy
check
public void check(Shout shout)
throws IllegalShoutException
- accepts all shouts and
IllegalShoutException is never thrown.
- Specified by:
check in class OnlyNewShoutDecidingAcceptingPolicy
- Parameters:
shout - the shout being checked.
- Throws:
IllegalShoutException- See Also:
OnlyNewShoutDecidingAcceptingPolicy.check(edu.cuny.cat.core.Shout)
eventOccurred
public void eventOccurred(AuctionEvent event)
- Specified by:
eventOccurred in interface AuctionEventListener- Overrides:
eventOccurred in class AuctioneerPolicy