}
@Atomic
public Integer delete(){
DirectoryManager locator = HyFlow.getLocator();
_Node front = (_Node)locator.open(FRONT);
_Node deleteNode;
String oldNext = front.getNext();
if(oldNext == END){
System.out.println("Queue is Empty!!");
return null;
}
else{
deleteNode = (_Node)locator.open(oldNext);
String newNext = deleteNode.getNext();
front.setNext(newNext);
String id = (String) deleteNode.getId();
Integer value = deleteNode.getValue();
locator.delete(deleteNode);
System.out.println("<" + id + "> " + value + " DELETED....");
return value;
}
}