Commit c5b06aaa by Xia Li Committed by Nixon Rodrigues

ATLAS-3134 Change Date.getTime() to System.currentTimeMillis() for better performance

parent 1d2aad52
......@@ -525,12 +525,11 @@ public class AtlasTypeDefGraphStoreV2 extends AtlasTypeDefGraphStore {
* increment the version value for this vertex
*/
private void markVertexUpdated(AtlasVertex vertex) {
Date now = new Date();
Number currVersion = vertex.getProperty(Constants.VERSION_PROPERTY_KEY, Number.class);
long newVersion = currVersion == null ? 1 : (currVersion.longValue() + 1);
vertex.setProperty(Constants.MODIFIED_BY_KEY, getCurrentUser());
vertex.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY, now.getTime());
vertex.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY, System.currentTimeMillis());
vertex.setProperty(Constants.VERSION_PROPERTY_KEY, newVersion);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment