edu.umich.eecs.tac.props
Class Ranking.Slot

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractTransportable
      extended by edu.umich.eecs.tac.props.Ranking.Slot
All Implemented Interfaces:
java.io.Serializable, se.sics.isl.transport.Transportable
Enclosing class:
Ranking

public static class Ranking.Slot
extends AbstractTransportable

The slot for the ranking. The slot contains the ad link and the promoted status.

See Also:
TAC Documentation, Serialized Form

Constructor Summary
Ranking.Slot()
          Creates an empty slot.
Ranking.Slot(AdLink adLink, boolean promoted)
          Creates a slot with an ad link and promoted status.
 
Method Summary
 AdLink getAdLink()
          Returns the ad link.
 boolean isPromoted()
          Returns the promoted status.
protected  void readWithLock(se.sics.isl.transport.TransportReader reader)
          Read the ad link and the promoted status from the reader.
 void setAdLink(AdLink adLink)
          Sets the ad link.
 void setPromoted(boolean promoted)
          Sets the promoted status.
protected  void writeWithLock(se.sics.isl.transport.TransportWriter writer)
          Write the ad link and the promoted status to the writer.
 
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

Ranking.Slot

public Ranking.Slot()
Creates an empty slot.


Ranking.Slot

public Ranking.Slot(AdLink adLink,
                    boolean promoted)
Creates a slot with an ad link and promoted status.

Parameters:
adLink - the ad link.
promoted - the promoted status.
Method Detail

getAdLink

public final AdLink getAdLink()
Returns the ad link.

Returns:
the ad link.

setAdLink

public final void setAdLink(AdLink adLink)
Sets the ad link.

Parameters:
adLink - the ad link.

isPromoted

public final boolean isPromoted()
Returns the promoted status.

Returns:
the promoted status.

setPromoted

public final void setPromoted(boolean promoted)
Sets the promoted status.

Parameters:
promoted - the promoted status.

readWithLock

protected final void readWithLock(se.sics.isl.transport.TransportReader reader)
                           throws java.text.ParseException
Read the ad link and the promoted status from the reader.

Specified by:
readWithLock in class AbstractTransportable
Parameters:
reader - the reader to read data from.
Throws:
java.text.ParseException - if an exception occurs while reading the promoted status and ad link.

writeWithLock

protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
Write the ad link and the promoted status to the writer.

Specified by:
writeWithLock in class AbstractTransportable
Parameters:
writer - the writer to write data to.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.