Improve time based UUID speed and configuration.
[lgpl/argeo-commons.git] / org.argeo.api.uuid / src / org / argeo / api / uuid / AbstractUuidFactory.java
index ba2196add75155b6f33360634959ef8ca759675f..9d829987b6cd6cd047d939ddbba3da7ffb26db73 100644 (file)
@@ -272,7 +272,7 @@ public abstract class AbstractUuidFactory implements UuidFactory {
                return new String(hexChars);
        }
 
-       protected byte[] toNodeId(byte[] source, int offset) {
+       protected byte[] toNodeIdBytes(byte[] source, int offset) {
                if (source == null)
                        return null;
                if (offset < 0 || offset + 6 > source.length)
@@ -282,6 +282,17 @@ public abstract class AbstractUuidFactory implements UuidFactory {
                return nodeId;
        }
 
+//     protected long toNodeIdBase(byte[] node) {
+//             assert node.length == 6;
+//             return LEAST_SIG_RFC4122_VARIANT // base for Leach–Salz UUID
+//                             | (node[0] & 0xFFL) //
+//                             | ((node[1] & 0xFFL) << 8) //
+//                             | ((node[2] & 0xFFL) << 16) //
+//                             | ((node[3] & 0xFFL) << 24) //
+//                             | ((node[4] & 0xFFL) << 32) //
+//                             | ((node[5] & 0xFFL) << 40); //
+//     }
+
        /*
         * STATIC UTILITIES
         */