|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umich.eecs.tac.props.AbstractTransportable edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking<S> edu.umich.eecs.tac.props.AbstractKeyedEntryList<Query,T> edu.umich.eecs.tac.props.AbstractQueryKeyedReportTransportable<BidBundle.BidEntry> edu.umich.eecs.tac.props.BidBundle
public class BidBundle
BidBundles specify all relevant bidding information for a given Advertister.
Each BidBundle contains a set of Bid Entries
,
each for a given query. Each BidEntry contains:
Ad
- The ad to be used for the given query.Each BidBundle also can contains a Campaign Daily Spend Limit, which specifies the total amount of money an advertiser is willing to spend over all queries daily.
Advertisers typically send BidBundles on a daily basis to the Publisher.
Nested Class Summary | |
---|---|
static class |
BidBundle.BidEntry
Each BidEntry contains: Ad - The ad to be used for the given query.
Bid - The given bid to be used for the given query.
Daily Limit - The daily spend limit to be used for the given query
|
Field Summary | |
---|---|
static double |
NO_SHOW_BID
Advertiser's wishing not to be shown should use the given NO_SHOW_BID value. |
static double |
NO_SPEND_LIMIT
Advertiser's wishing to have no spend limit should use the given NO_SPEND_LIMIT value. |
static Ad |
PERSISTENT_AD
The persistent value for ad. |
static double |
PERSISTENT_BID
The persistent value for bid. |
static double |
PERSISTENT_SPEND_LIMIT
The persistent value for spend limit. |
Constructor Summary | |
---|---|
BidBundle()
Creates a new BidBundle. |
Method Summary | |
---|---|
void |
addQuery(Query query,
double bid,
Ad ad)
Adds a BidBundle.BidEntry keyed with the specified query and the
given bid and Ad. |
void |
addQuery(Query query,
double bid,
Ad ad,
double dailyLimit)
Adds a BidBundle.BidEntry keyed with the specified query and the
given bid and Ad. |
protected BidBundle.BidEntry |
createEntry(Query key)
Creates a BidBundle.BidEntry with the given query as the key. |
protected java.lang.Class |
entryClass()
Returns the BidBundle.BidEntry class. |
Ad |
getAd(int index)
Returns the ad for the associated query. |
Ad |
getAd(Query query)
Returns the ad for the associated query. |
double |
getBid(int index)
Returns the bid for the associated query. |
double |
getBid(Query query)
Returns the bid for the associated query. |
double |
getCampaignDailySpendLimit()
Returns the campaign daily spend limit for the associated query. |
double |
getDailyLimit(int index)
Returns the daily spend limit for the associated query. |
double |
getDailyLimit(Query query)
Returns the daily spend limit for the associated query. |
protected void |
readBeforeEntries(se.sics.isl.transport.TransportReader reader)
Reads the campaign daily spend limit from the reader. |
void |
setAd(int index,
Ad ad)
Sets the ad for a query. |
void |
setAd(Query query,
Ad ad)
Sets the ad for a query. |
void |
setBid(int index,
double bid)
Sets the bid for a query. |
void |
setBid(Query query,
double bid)
Sets the bid for a query. |
void |
setBidAndAd(int index,
double bid,
Ad ad)
Sets the bid and ad for a query. |
void |
setBidAndAd(Query query,
double bid,
Ad ad)
Sets the bid and ad for a query. |
void |
setCampaignDailySpendLimit(double campaignDailySpendLimit)
Sets the campaign daily spend limit. |
void |
setDailyLimit(int index,
double dailyLimit)
Sets the daily spend limit for a query. |
void |
setDailyLimit(Query query,
double dailyLimit)
Sets the daily spend limit for a query. |
protected void |
toStringBeforeEntries(java.lang.StringBuilder builder)
Appends the campaign daily spend limit. |
protected void |
writeBeforeEntries(se.sics.isl.transport.TransportWriter writer)
Writes the campaign daily spend limit to the writer. |
Methods inherited from class edu.umich.eecs.tac.props.AbstractQueryKeyedReportTransportable |
---|
addQuery, containsQuery, getQuery |
Methods inherited from class edu.umich.eecs.tac.props.AbstractKeyedEntryList |
---|
addKey, containsKey, getEntry, getKey, indexForEntry, iterator, keys |
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking |
---|
addEntry, afterAddEntry, afterRemoveEntry, beforeAddEntry, beforeRemoveEntry, getEntries, getEntry, readAfterEntries, readWithLock, removeEntry, size, toString, toStringAfterEntries, writeAfterEntries, writeWithLock |
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, wait, wait, wait |
Field Detail |
---|
public static final double PERSISTENT_SPEND_LIMIT
public static final double PERSISTENT_BID
public static final Ad PERSISTENT_AD
public static final double NO_SPEND_LIMIT
public static final double NO_SHOW_BID
Constructor Detail |
---|
public BidBundle()
Method Detail |
---|
protected final BidBundle.BidEntry createEntry(Query key)
BidBundle.BidEntry
with the given query
as the key.
createEntry
in class AbstractKeyedEntryList<Query,BidBundle.BidEntry>
key
- the query key
BidBundle.BidEntry
with the given query
as the key.protected final java.lang.Class entryClass()
BidBundle.BidEntry
class.
entryClass
in class AbstractTransportableEntryListBacking<BidBundle.BidEntry>
BidBundle.BidEntry
class.public final void addQuery(Query query, double bid, Ad ad)
BidBundle.BidEntry
keyed with the specified query and the
given bid and Ad. The spend limit is set to PERSISTENT_SPEND_LIMIT.
query
- the query key.bid
- the bid value.ad
- the ad to be used.public final void addQuery(Query query, double bid, Ad ad, double dailyLimit)
BidBundle.BidEntry
keyed with the specified query and the
given bid and Ad. The spend limit is set to PERSISTENT_SPEND_LIMIT.
query
- the query key.bid
- the bid value.ad
- the ad to be used.dailyLimit
- the daily limit.public final void setBid(Query query, double bid)
query
- the query.bid
- the bid.public final void setBid(int index, double bid)
index
- the index of the query.bid
- the bid.public final void setAd(Query query, Ad ad)
query
- the query.ad
- the ad.public final void setAd(int index, Ad ad)
index
- the index of the query.ad
- the ad.public final void setDailyLimit(Query query, double dailyLimit)
query
- the query.dailyLimit
- the daily spend limit.public final void setDailyLimit(int index, double dailyLimit)
index
- the index of the query.dailyLimit
- the daily spend limit.public final void setBidAndAd(Query query, double bid, Ad ad)
query
- the query.bid
- the bid.ad
- the ad.public final void setBidAndAd(int index, double bid, Ad ad)
index
- the index of the query.bid
- the bid.ad
- the ad.public final double getBid(Query query)
query
- the query.
public final double getBid(int index)
index
- the index of the query.
public final Ad getAd(Query query)
query
- the query.
public final Ad getAd(int index)
index
- the index of the query.
public final double getDailyLimit(Query query)
query
- the query.
public final double getDailyLimit(int index)
index
- the index of the query.
public final double getCampaignDailySpendLimit()
public final void setCampaignDailySpendLimit(double campaignDailySpendLimit)
campaignDailySpendLimit
- the campaign daily spend limit.protected final void readBeforeEntries(se.sics.isl.transport.TransportReader reader) throws java.text.ParseException
readBeforeEntries
in class AbstractTransportableEntryListBacking<BidBundle.BidEntry>
reader
- the reader that is read from.
java.text.ParseException
- if exception occurs before reading the campaign daily spend limitprotected final void writeBeforeEntries(se.sics.isl.transport.TransportWriter writer)
writeBeforeEntries
in class AbstractTransportableEntryListBacking<BidBundle.BidEntry>
writer
- the writer that is written to.protected final void toStringBeforeEntries(java.lang.StringBuilder builder)
toStringBeforeEntries
in class AbstractTransportableEntryListBacking<BidBundle.BidEntry>
builder
- the builder to append for the AbstractTransportableEntryListBacking.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |