public class Portfolio extends Object implements com.gemstone.gemfire.cache.Declarable, Serializable
Position
objects that represent shares of stock (a "security"). Instances
of Portfolio can be stored in a GemFire
Region and their contents can be queried using the
GemFire query service.
This class is Serializable because we want it to be
distributed to multiple members of a distributed system. Because
this class is Declarable, we can describe instances of
it in a GemFire cache.xml file.
| Constructor and Description |
|---|
Portfolio() |
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Returns the id of this portfolio.
|
Map<String,Position> |
getPositions()
Returns the positions held in this portfolio.
|
String |
getStatus()
Returns the status of this portfolio (
active or
inactive). |
String |
getType()
Returns the type of this portfolio.
|
void |
init(Properties props)
Initializes an instance of
Portfolio from a
Properties object assembled from data residing in a
cache.xml file. |
boolean |
isActive()
Returns whether or not this portfolio is active.
|
String |
toString() |
public void init(Properties props)
Portfolio from a
Properties object assembled from data residing in a
cache.xml file.init in interface com.gemstone.gemfire.cache.Declarablepublic String getStatus()
active or
inactive).public int getId()
Portfolio
placed in a GemFire Region entry, its id is used as
the key.public Map<String,Position> getPositions()
Map whose keys are the security ids and whose values are
Position objects.public String getType()
public boolean isActive()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.