public Node(String id) {
super();
this.id = id;
- this.links = new ArrayList<Node>();
+ this.links = new ArrayList<>();
}
public List<Node> getLinks() {
}
public DeadlockDetectionUtil() {
- this.nodeList = new HashMap<String, Node>();
+ this.nodeList = new HashMap<>();
}
public void listAllNodes() {
currentNode = nodeList.get("o" + owner);
}
- boolean cycle = findCycle(currentNode);
- return cycle;
+ return findCycle(currentNode);
}
private boolean findCycle(Node currentNode) {
case MAP:
return (Map<String, Object>) valueObj;
case LIST:
- return (List<Object>)valueObj;
+ return valueObj;
case BLOB:
default:
}
public static ByteBuffer convertToActualDataType(DataType colType, byte[] valueObj) {
- ByteBuffer buffer = ByteBuffer.wrap(valueObj);
- return buffer;
+
+ return ByteBuffer.wrap(valueObj);
}
/**
* @throws MusicServiceException
* @throws MusicQueryException
*/
- public static long v2sTimeStampInMicroseconds(long ordinal, long timeOfWrite) throws MusicServiceException, MusicQueryException {
+ public static long v2sTimeStampInMicroseconds(long ordinal, long timeOfWrite) throws MusicServiceException, MusicQueryException{
// TODO: use acquire time instead of music eternity epoch
- long ts = ordinal * MaxLockReferenceTimePart + (timeOfWrite - MusicEternityEpochMillis);
-
- return ts;
+ return ordinal * MaxLockReferenceTimePart + (timeOfWrite - MusicEternityEpochMillis);
}
public static MusicCoreService getMusicCoreService() {
ReturnType result = null;
try {
+
PreparedQueryObject queryObj = null;
queryObj = jsonInsertObj.genInsertPreparedQueryObj();
-
+
if (consistency.equalsIgnoreCase(MusicUtil.EVENTUAL)) {
result = eventualPut(jsonInsertObj.genInsertPreparedQueryObj());
} else if (consistency.equalsIgnoreCase(MusicUtil.CRITICAL)) {