public class BrachaTouegDeadlockVertexValue extends Object implements org.apache.hadoop.io.Writable
| Modifier and Type | Field and Description | 
|---|---|
static Long | 
INVALID_ID
Invalid ID 
 | 
| Constructor and Description | 
|---|
BrachaTouegDeadlockVertexValue()
Default constructor 
 | 
BrachaTouegDeadlockVertexValue(HashMap<Long,ArrayList<Long>> requests)
Parametrized constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addParent(Long parentId)
add a parent id into the list of parents kept at the vertex side 
 | 
Long | 
getIdWithInHoldAck()  | 
Long | 
getIdWithInHoldDone()  | 
int | 
getNumOfRequests(org.apache.hadoop.io.LongWritable tag)
This function retrieves the number of pending requests for the specified
 tag. 
 | 
ArrayList<Long> | 
getParents()  | 
boolean | 
hasPendingRequests()  | 
boolean | 
isFree()  | 
boolean | 
isNotified()  | 
boolean | 
isWaitingForMessage(Long type)  | 
void | 
readFields(DataInput input)  | 
void | 
receivedMessage(Long id,
               Long type)
Each time a message is received, it has to be removed from the queue
 that keeps track of the waited messages. 
 | 
void | 
removeRequest(org.apache.hadoop.io.LongWritable tag,
             org.apache.hadoop.io.LongWritable targetId)
remove the expected request from the edge on which the message arrived 
 | 
void | 
setFree()
the vertex is free from deadlocks 
 | 
void | 
setIdWithInHoldAck(Long id)  | 
void | 
setIdWithInHoldDone(Long doneId)  | 
void | 
setNotified()
the vertex got a notification 
 | 
String | 
toString()  | 
void | 
waitForMessage(Long id,
              Long type)
Add a new message that must be expected by the node 
 | 
void | 
write(DataOutput output)  | 
public static final Long INVALID_ID
public BrachaTouegDeadlockVertexValue()
public void readFields(DataInput input) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput output) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic boolean isFree()
public void setFree()
public boolean isNotified()
public void setNotified()
public boolean hasPendingRequests()
public void removeRequest(org.apache.hadoop.io.LongWritable tag,
                          org.apache.hadoop.io.LongWritable targetId)
tag - tag of the edgetargetId - target Id to which the edge pointspublic int getNumOfRequests(org.apache.hadoop.io.LongWritable tag)
tag - tag related to the requests to be verifiedpublic void waitForMessage(Long id, Long type)
id - ID of the node from which the messages is expectedtype - type of message that is awaitedpublic void receivedMessage(Long id, Long type)
id - ID of the node from which the messages is expectedtype - type of message that is awaitedpublic boolean isWaitingForMessage(Long type)
type - type of message to checkpublic void addParent(Long parentId)
parentId - vertex id of the parentpublic Long getIdWithInHoldAck()
public void setIdWithInHoldAck(Long id)
id - the id to setpublic Long getIdWithInHoldDone()
public void setIdWithInHoldDone(Long doneId)
doneId - the id to setCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.