| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.archive.dissemination.DisseminationSetPredicate
DisseminationSetPredicate is used to specify the
 constraints that the dissemination set must satisfy.
 For example, the following SQL-like query
 SELECT 64 distinct(node)
 the above SQL-like query is equivalent to requesting 64 nodes
 that have a high probability of being up, the intersection
 between their classification, domain, and location is empty (i.e. they
 are not correlated, have different domains, and are geographically,
 spread), and their is an affinity to pick nodes in different time
 zones.
 
          WHERE availability > 0.95 AND
                distinct(label/classification) AND
                distinct(domain) AND
                distinct(location) AND
                spread(time zone)
  
The query result is simply a set of nodes that satisfies the query or an empty set if the query cannot be satisfied.
 To receive a dissemination set, dispatch a 
 RequestDisseminationSetMsg
 containing a DisseminationSetPredicate.
 When the SetCreator receives the message, it will 
 respond with a  
 RequestDisseminationSetResponseMsg containing a set of 
 dissemination sets.
 
SetCreatorStage, 
RequestDisseminationSetQuery, 
RequestDisseminationSetResponseMsg, 
DDLocateMsg| Field Summary | |
|---|---|
static byte | 
CONSTRAINT_ANY
 | 
static byte | 
CONSTRAINT_DISTINCT
 | 
static byte | 
CONSTRAINT_NONE
 | 
static byte | 
CONSTRAINT_SAME
 | 
static byte | 
CONSTRAINT_SPREAD
 | 
static String[] | 
CONSTRAINT_STRING
 | 
| Constructor Summary | |
|---|---|
DisseminationSetPredicate(InputBuffer buffer)
Constructs a DisseminationSetPredicate from its
 serialized form. | 
|
DisseminationSetPredicate(int numNodes,
                          double availability,
                          long lifetime,
                          byte classification,
                          byte domain,
                          byte location,
                          byte timeZone,
                          HostAppFilter filter)
Construct according to the given fields.  | 
|
DisseminationSetPredicate(int minNumNodes,
                          int maxNumNodes,
                          double availability,
                          long lifetime,
                          byte classification,
                          byte domain,
                          byte location,
                          byte timeZone,
                          HostAppFilter filter)
Construct according to the given fields.  | 
|
| Method Summary | |
|---|---|
 double | 
getAvailability()
getAvailability returns minimum threshold of availability
 for a node in the dissemination set. | 
 byte | 
getClassification()
getClassification returns classification
 constraint that the dissemination set needs to satifsfy.
  | 
 byte | 
getDomain()
getDomain returns domain
 constraint that the dissemination set needs to satifsfy.
  | 
 HostAppFilter | 
getFilter()
getFilter returns an application
 filter summarizing
 the applications that hosts must export.   | 
 long | 
getLifetime()
getLifetime returns minimum threshold of lifetime
 (in us) for a node in the dissemination set. | 
 byte | 
getLocation()
getLocation returns location
 constraint that the dissemination set needs to satifsfy.
  | 
 int | 
getMaxNumNodes()
getMaxNumNodes returns the maximum number of nodes requested
 to be returned; that is, size of the returned dissemination set. | 
 int | 
getMinNumNodes()
getMinNumNodes returns the minimum number of nodes requested
 to be returned; that is, size of the returned dissemination set. | 
 byte | 
getTimeZone()
getTimeZone returns timeZone
 constraint that the dissemination set needs to satifsfy.
  | 
 void | 
serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable  | 
 String | 
toString()
Specified by java.lang.Object  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final byte CONSTRAINT_NONE
public static final byte CONSTRAINT_DISTINCT
public static final byte CONSTRAINT_ANY
public static final byte CONSTRAINT_SAME
public static final byte CONSTRAINT_SPREAD
public static final String[] CONSTRAINT_STRING
| Constructor Detail | 
public DisseminationSetPredicate(int numNodes,
                                 double availability,
                                 long lifetime,
                                 byte classification,
                                 byte domain,
                                 byte location,
                                 byte timeZone,
                                 HostAppFilter filter)
public DisseminationSetPredicate(int minNumNodes,
                                 int maxNumNodes,
                                 double availability,
                                 long lifetime,
                                 byte classification,
                                 byte domain,
                                 byte location,
                                 byte timeZone,
                                 HostAppFilter filter)
public DisseminationSetPredicate(InputBuffer buffer)
                          throws QSException
DisseminationSetPredicate from its
 serialized form.
buffer - serialized
                form of object.| Method Detail | 
public int getMinNumNodes()
getMinNumNodes returns the minimum number of nodes requested
 to be returned; that is, size of the returned dissemination set.
public int getMaxNumNodes()
getMaxNumNodes returns the maximum number of nodes requested
 to be returned; that is, size of the returned dissemination set.
public double getAvailability()
getAvailability returns minimum threshold of availability
 for a node in the dissemination set.
public long getLifetime()
getLifetime returns minimum threshold of lifetime
 (in us) for a node in the dissemination set.
public byte getClassification()
getClassification returns classification
 constraint that the dissemination set needs to satifsfy.
 For example, no constraint on classification,
 or each node has a distinct classification,
 or each node has a any classification,
 or each node has the same classification,
 or set of classifications is spread over
 all possible classifications (i.e. there may be nodes with duplicate
 classifications).
public byte getDomain()
getDomain returns domain
 constraint that the dissemination set needs to satifsfy.
 For example, no constraint on domain,
 or each node has a distinct domain,
 or each node has a any domain,
 or each node has the same domain,
 or set of domains is spread over
 all possible domains (i.e. there may be nodes with duplicate
 domains).
public byte getLocation()
getLocation returns location
 constraint that the dissemination set needs to satifsfy.
 For example, no constraint on location,
 or each node has a distinct location,
 or each node has a any location,
 or each node has the same location,
 or set of locations is spread over
 all possible locations (i.e. there may be nodes with duplicate
 locations).
public byte getTimeZone()
getTimeZone returns timeZone
 constraint that the dissemination set needs to satifsfy.
 For example, no constraint on timeZone,
 or each node has a distinct timeZone,
 or each node has a any timeZone,
 or each node has the same timeZone,
 or set of timeZones is spread over
 all possible timeZones (i.e. there may be nodes with duplicate
 timeZones).
public HostAppFilter getFilter()
getFilter returns an application
 filter summarizing
 the applications that hosts must export.  For example,
 filter specify
 storage server if looking for a storage node.
filter summarizing
 the applications that hosts must export.public void serialize(OutputBuffer buffer)
serialize in interface QuickSerializablebuffer - the output buffer to add the object topublic String toString()
toString in class Object
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||