|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umich.eecs.tac.props.AbstractTransportable
edu.umich.eecs.tac.props.Pricing
public class Pricing
Pricing represents the CPC's charged to the advertisers when a user clicks.
| Constructor Summary | |
|---|---|
Pricing()
Creates an empty pricing. |
|
| Method Summary | |
|---|---|
java.util.Set<AdLink> |
adLinks()
Returns the set of ad links priced. |
double |
getPrice(AdLink ad)
Returns the CPC of the AdLink. |
protected void |
readPriceEntry(se.sics.isl.transport.TransportReader reader)
Reads the price entry from the writer. |
protected void |
readWithLock(se.sics.isl.transport.TransportReader reader)
Reads the pricing information from the reader. |
void |
setPrice(AdLink ad,
double price)
Sets the price of the AdLink. |
protected void |
writePriceEntry(se.sics.isl.transport.TransportWriter writer,
java.lang.Double price,
AdLink adLink)
Writes the price entry to the writer. |
protected void |
writeWithLock(se.sics.isl.transport.TransportWriter writer)
Writes the pricing information to the reader. |
| Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportable |
|---|
getTransportName, isLocked, lock, lockCheck, read, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Pricing()
| Method Detail |
|---|
public final void setPrice(AdLink ad,
double price)
throws java.lang.NullPointerException
AdLink.
ad - the ad link.price - the CPC.
java.lang.NullPointerException - if the ad link is null.public final double getPrice(AdLink ad)
AdLink.
ad - the ad link.
AdLink.public final java.util.Set<AdLink> adLinks()
protected final void readWithLock(se.sics.isl.transport.TransportReader reader)
throws java.text.ParseException
readWithLock in class AbstractTransportablereader - the reader to read data from.
java.text.ParseException - if exception occurs when reading the mapping.protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
writeWithLock in class AbstractTransportablewriter - the writer to write data to.
protected final void writePriceEntry(se.sics.isl.transport.TransportWriter writer,
java.lang.Double price,
AdLink adLink)
writer - the writer to write data to.price - the CPCadLink - the ad link
protected final void readPriceEntry(se.sics.isl.transport.TransportReader reader)
throws java.text.ParseException
reader - the reader to read data from.
java.text.ParseException - if exception occurs when a price entry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||