public class BrokerTicket extends Object implements com.gemstone.gemfire.DataSerializable, com.gemstone.gemfire.cache.util.ObjectSizer
Broker.
Implements DataSerializable for better performance and ObjectSizer for better use with an memory evictor.
| Modifier and Type | Field and Description |
|---|---|
static String |
REGION_TABLE_NAME |
static String |
REGION_TABLE_SHORT_NAME |
| Constructor and Description |
|---|
BrokerTicket() |
| Modifier and Type | Method and Description |
|---|---|
static String |
commaSeparatedStringFor(Vector fields) |
void |
fromData(DataInput in) |
int |
getBrokerId() |
protected static String |
getFiller(int tid)
Returns a String for the filler fields.
|
int |
getId() |
protected static int |
getId(int i,
int bid,
int numTicketsPerBroker)
Returns a unique id for the i'th ticket for the given broker id and number
of tickets per broker.
|
double |
getPrice() |
protected static double |
getPrice(int tid,
int numTicketPrices)
Returns a price for the given ticket id and number of unique ticket prices.
|
int |
getQuantity() |
protected static int |
getQuantity(int tid)
Returns a quantity for the given ticket id.
|
static String |
getTableAndShortName() |
static String |
getTableName() |
static String |
getTableShortName() |
String |
getTicker() |
protected static String |
getTicker(int tid)
Returns a ticker for the given ticket id.
|
void |
init(int i,
int bid,
int numTicketsPerBroker,
int numTicketPrices)
Initialize the i'th ticket for the given broker id.
|
void |
setBrokerId(int brokerId) |
void |
setId(int id) |
void |
setPrice(double price) |
void |
setQuantity(int quantity) |
void |
setTicker(String ticker) |
int |
sizeof(Object o) |
void |
toData(DataOutput out) |
String |
toString() |
public static String REGION_TABLE_NAME
public static String REGION_TABLE_SHORT_NAME
public static String getTableName()
public static String getTableShortName()
public static String getTableAndShortName()
protected static int getId(int i,
int bid,
int numTicketsPerBroker)
protected static double getPrice(int tid,
int numTicketPrices)
protected static int getQuantity(int tid)
protected static String getTicker(int tid)
protected static String getFiller(int tid)
public void init(int i,
int bid,
int numTicketsPerBroker,
int numTicketPrices)
public int getId()
public void setId(int id)
public int getBrokerId()
public void setBrokerId(int brokerId)
public double getPrice()
public void setPrice(double price)
public int getQuantity()
public void setQuantity(int quantity)
public String getTicker()
public void setTicker(String ticker)
public int sizeof(Object o)
sizeof in interface com.gemstone.gemfire.cache.util.ObjectSizerpublic void toData(DataOutput out) throws IOException
toData in interface com.gemstone.gemfire.DataSerializableIOExceptionpublic void fromData(DataInput in) throws IOException, ClassNotFoundException
fromData in interface com.gemstone.gemfire.DataSerializableIOExceptionClassNotFoundExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.