Yair Zaslavsky has posted comments on this change.

Change subject: core: Cache GUID creation
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/NGuid.java
Line 20:             5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 };
Line 21:     private static final byte[] KEEP_BYTE_ORDER_INDICES = { 0, 1, 2, 3,
Line 22:             4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
Line 23: 
Line 24:     private Map<String, UUID> cachedGuids = new HashMap<String, 
UUID>();
You can use JDK 7 syntax here.
Is it ok it's a map and not ConcurrentHashMap?
Line 25:     
Line 26:     public final static Guid Empty = new Guid();
Line 27: 
Line 28:     public static Guid NewGuid() {


Line 21:     private static final byte[] KEEP_BYTE_ORDER_INDICES = { 0, 1, 2, 3,
Line 22:             4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
Line 23: 
Line 24:     private Map<String, UUID> cachedGuids = new HashMap<String, 
UUID>();
Line 25:     
Trailing whitespace, please remove.
Also, please consult with Allon Mureinik about his work to unify NGuid and Guid.
Line 26:     public final static Guid Empty = new Guid();
Line 27: 
Line 28:     public static Guid NewGuid() {
Line 29:         return new Guid(UUID.randomUUID());


-- 
To view, visit http://gerrit.ovirt.org/16079
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I49a103f6194d9c4b703c1bc965b5a56bba4e9634
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to