|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dd.ptr.api.PtrReq | +--dd.ptr.api.GetPtrReq
Ask for the publish info of certain objects from the pointer manager stage.
Field Summary | |
---|---|
bamboo.vivaldi.VirtualCoordinate |
coordinate
VirtualCoordinate used to calculate relative
distances. |
boolean |
local
SQL-like query equivalent to SELECT pinfo FROM p AS ptrs WHERE p.local=true AND p.objguid=objguid
That is, select PublishInfo 's
where the src is this node.
|
boolean |
nonroot
SQL-like query equivalent to SELECT pinfo FROM p AS ptrs WHERE p.root=false AND p.objguid=objguid
That is, select PublishInfo 's
that this node is the root for.
|
SecureHash[] |
objguids
Array of objguids of
ptrs to retrieve from the
PtrMgr stage. |
short |
policy
policy defines the SQL-like query to run
over the ptr ,
level , and host
data structures. |
static short |
POLICY_DEAD
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.guid AND
p.src=h.guid AND h.state=DEAD .
|
static short |
POLICY_DOWN
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS level
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND (h.state=DEAD OR h.state=HIBERNATING) .
|
static short |
POLICY_EXPIRED
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, l AS levels
WHERE p.objguid=objguid AND l.p.deadline > now .
|
static short |
POLICY_HIBERNATING
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=HIBERNATING .
|
static short |
POLICY_INSTANCEOF_THRESHOLD
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, l AS levels
WHERE p.objguid = objguid AND
l.level=root AND l.guid=p.objguid AND
(p.tag instanceof DDThresholdTag) .
|
static short |
POLICY_NONE
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs
WHERE p.objguid=objguid .
|
static short |
POLICY_NORMAL
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=NORMAL .
|
static short |
POLICY_REVIVING
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=REVIVING .
|
static String[] |
POLICY_STRING
Strings corresponding to ptr queries. |
static short |
POLICY_THRESHOLD_REACHED
SQL-like query equivalent to SELECT pinfos
FROM p1 AS ptrs, l AS levels
WHERE p1.objguid=objguid AND
l.level=root AND l.guid=p1.objguid AND
(p1.tag instanceof DDThresholdTag) AND
p1.low_watermark > (SELECT COUNT
FROM p2 as ptrs, h AS hosts
WHERE
p1.objguid=p2.objguid AND
p1.tag=p2.tag AND
p2.src=h.guid AND
(h.state=NORMAL OR h.state=REVIVING)
That is, select PublishInfo 's
where the remaining number of PublishInfo 's
is less that the
DDThresholdTag.low_watermark . |
static short |
POLICY_UP
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level==root AND l.guid=p.objguid AND
p.src=h.guid AND (h.state=NORMAL OR h.state=REVIVING) .
|
static short |
POLICY_UP_OR_HIBERNATING
SQL-like query equivalent to SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level==root AND l.guid=p.objguid AND
p.src=h.guid AND
(h.state=NORMAL OR h.state=REVIVING OR h.state=HIBERNATING)
.
|
boolean |
root
SQL-like query equivalent to SELECT pinfo FROM p AS ptrs WHERE p.root=true AND p.objguid=objguid
That is, select PublishInfo 's
that this node is the root for.
|
boolean |
useCache
Flag indicating whether query should use the cache (if there is a valid entry) or only use disk. |
Fields inherited from class dd.ptr.api.PtrReq |
---|
appId, sink, userData |
Constructor Summary | |
---|---|
GetPtrReq(SecureHash[] objguids,
short policy,
boolean root,
boolean nonroot,
boolean local,
boolean useCache,
bamboo.vivaldi.VirtualCoordinate coordinate,
long appId,
Object userData,
SinkIF sink)
Constructor: Creates a new GetPtrReq .
|
|
GetPtrReq(SecureHash objguid,
short policy,
boolean root,
boolean nonroot,
boolean local,
boolean useCache,
bamboo.vivaldi.VirtualCoordinate coordinate,
long appId,
Object userData,
SinkIF sink)
Constructor: Creates a new GetPtrReq .
|
Method Summary | |
---|---|
String |
toString()
Specified by java.lang.Object |
Methods inherited from class dd.ptr.api.PtrReq |
---|
BUG |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short POLICY_NONE
SELECT pinfos
FROM p AS ptrs
WHERE p.objguid=objguid
.
That is, select all PublishInfo
's
that match the given objguid.
public static final short POLICY_EXPIRED
SELECT pinfos
FROM p AS ptrs, l AS levels
WHERE p.objguid=objguid AND l.p.deadline > now
.
That is, for all the ptrs where the local node is root,
select expired PublishInfo
's.
public static final short POLICY_UP
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level==root AND l.guid=p.objguid AND
p.src=h.guid AND (h.state=NORMAL OR h.state=REVIVING)
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is up.
public static final short POLICY_UP_OR_HIBERNATING
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level==root AND l.guid=p.objguid AND
p.src=h.guid AND
(h.state=NORMAL OR h.state=REVIVING OR h.state=HIBERNATING)
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is up or hibernating (we don't know up or
down).
public static final short POLICY_DOWN
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS level
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND (h.state=DEAD OR h.state=HIBERNATING)
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is down.
public static final short POLICY_NORMAL
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=NORMAL
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is normal.
public static final short POLICY_REVIVING
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=REVIVING
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is reviving.
public static final short POLICY_HIBERNATING
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.objguid AND
p.src=h.guid AND h.state=HIBERNATING
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is hibernating.
public static final short POLICY_DEAD
SELECT pinfos
FROM p AS ptrs, h AS hosts, l AS levels
WHERE p.objguid=objguid AND
l.level=root AND l.guid=p.guid AND
p.src=h.guid AND h.state=DEAD
.
That is, select PublishInfo
's
that match the given objguid, local node is root,
and where host is dead.
public static final short POLICY_INSTANCEOF_THRESHOLD
SELECT pinfos
FROM p AS ptrs, l AS levels
WHERE p.objguid = objguid AND
l.level=root AND l.guid=p.objguid AND
(p.tag instanceof DDThresholdTag)
.
That is, select PublishInfo
's
that local node is root and where tag instanceof
DDThresholdTag
.
- See Also:
- Constant Field Values
public static final short POLICY_THRESHOLD_REACHED
SELECT pinfos
FROM p1 AS ptrs, l AS levels
WHERE p1.objguid=objguid AND
l.level=root AND l.guid=p1.objguid AND
(p1.tag instanceof DDThresholdTag) AND
p1.low_watermark > (SELECT COUNT
FROM p2 as ptrs, h AS hosts
WHERE
p1.objguid=p2.objguid AND
p1.tag=p2.tag AND
p2.src=h.guid AND
(h.state=NORMAL OR h.state=REVIVING)
That is, select PublishInfo
's
where the remaining number of PublishInfo
's
is less that the
DDThresholdTag.low_watermark
.
public static final String[] POLICY_STRING
public SecureHash[] objguids
objguids
of
ptrs
to retrieve from the
PtrMgr
stage.
public boolean root
SELECT pinfo FROM p AS ptrs WHERE p.root=true AND p.objguid=objguid
That is, select PublishInfo
's
that this
node is the root for.
NOTE ALSO: cannot also run query over combined root (or non-root) and
local ptrs.
That is, root=true AND local=true.
public boolean nonroot
SELECT pinfo FROM p AS ptrs WHERE p.root=false AND p.objguid=objguid
That is, select PublishInfo
's
that this
node is the root for.
NOTE ALSO: cannot also run query over combined root (or non-root) and
local ptrs.
That is, root=true AND local=true.
public boolean local
SELECT pinfo FROM p AS ptrs WHERE p.local=true AND p.objguid=objguid
That is, select PublishInfo
's
where the src is this
node.
NOTE ALSO: cannot also run query over combined root and local ptrs.
That is, root=true AND local=true.
public boolean useCache
public bamboo.vivaldi.VirtualCoordinate coordinate
VirtualCoordinate
used to calculate relative
distances.
public short policy
policy
defines the SQL-like query to run
over the ptr
,
level
, and host
data structures.
Constructor Detail |
public GetPtrReq(SecureHash[] objguids, short policy, boolean root, boolean nonroot, boolean local, boolean useCache, bamboo.vivaldi.VirtualCoordinate coordinate, long appId, Object userData, SinkIF sink)
GetPtrReq
.
For a valid setting at least one has to be true: root
,
nonroot
, or local
. Also, local
overrides
root
and nonroot
, so either
(local
=T and root
=F and nonroot
=F) or
(local
=F and root
=T and/or nonroot
=T)
objguids
- Array of objguids
to
retrieve from DHT.policy
- SQL-like query to run over the
ptr
and
host
.root
- Select ptrs
that this
node is the root for.nonroot
- Select ptrs
that this
node is not the root for.local
- Select local ptrs
that this
node is the server for.useCache
- Flag indicating to use the cache of pointers.coordinate
- VirtualCoordinate
used to
calculate relative distances.appId
- Unique identifier for a destination application.userData
- Requestor defined object to be returned in the resp.sink
- Requestor sink
to
return resp.public GetPtrReq(SecureHash objguid, short policy, boolean root, boolean nonroot, boolean local, boolean useCache, bamboo.vivaldi.VirtualCoordinate coordinate, long appId, Object userData, SinkIF sink)
GetPtrReq
.
For a valid setting at least one has to be true: root
,
nonroot
, or local
. Also, local
overrides
root
and nonroot
, so either
(local
=T and root
=F and nonroot
=F) or
(local
=F and root
=T and/or nonroot
=T)
objguid
- objguid
retrieve from DHT.policy
- SQL-like query to run over the
ptr
and
host
.root
- Select ptrs
that this
node is the root for.nonroot
- Select ptrs
that this
node is not the root for.local
- Select local ptrs
that this
node is the server for.useCache
- Flag indicating to use the cache of pointers.coordinate
- VirtualCoordinate
used to
calculate relative distances.appId
- Unique identifier for a destination application.userData
- Requestor defined object to be returned in the resp.sink
- Requestor sink
to
return resp.Method Detail |
public String toString()
toString
in class PtrReq
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |