public static String generateLockToken() throws SVNException { String uuid = SVNUUIDGenerator.formatUUID(SVNUUIDGenerator.generateUUID()); return FSFS.SVN_OPAQUE_LOCK_TOKEN + uuid; }
public static synchronized byte[] generateUUID() throws SVNException { if (ourUUIDStateNode[0] == 0) { initState(); } long timestamp = getCurrentTime(); byte[] uuidData = new byte[16]; uuidData[0] = (byte) timestamp; uuidData[1] = (byte) (timestamp >> 8); uuidData[2] = (byte) (timestamp >> 16); uuidData[3] = (byte) (timestamp >> 24); uuidData[4] = (byte) (timestamp >> 32); uuidData[5] = (byte) (timestamp >> 40); uuidData[6] = (byte) (timestamp >> 48); uuidData[7] = (byte) (((timestamp >> 56) & 0x0F) | 0x10); uuidData[8] = (byte) (((ourUUIDStateSeqNum >> 8) & 0x3F) | 0x80); uuidData[9] = (byte) ourUUIDStateSeqNum; System.arraycopy(ourUUIDStateNode, 0, uuidData, 10, NODE_LENGTH); return uuidData; }
private static void initState() throws SVNException { /* * Offset between UUID formatted times and System.currentTimeMillis() * formatted times. UUID UTC base time is October 15, 1582. * System.currentTimeMillis() base time is January 1, 1970. */ long currentTime = System.currentTimeMillis() * 10 + 0x01B21DD213814000L; Random randomGen = new Random(); randomGen.setSeed(((currentTime >> 32) ^ currentTime) & 0xffffffffL); ourUUIDStateSeqNum = randomGen.nextLong() & 0x0FFFFL; getRandomInfo(ourUUIDStateNode); }
if (useUUIDGenerator) { fileName.append("."); fileName.append(SVNUUIDGenerator.generateUUIDString()); fileName.append("."); if (useUUIDGenerator) { fileName.append(SVNUUIDGenerator.generateUUIDString()); } else { fileName.append(i);
if (useUUIDGenerator) { fileName.append("."); fileName.append(SVNUUIDGenerator.generateUUIDString()); fileName.append("."); if (useUUIDGenerator) { fileName.append(SVNUUIDGenerator.generateUUIDString()); } else { fileName.append(i);
public static String generateUUIDString() throws SVNException { return formatUUID(generateUUID()); }
public static synchronized byte[] generateUUID() throws SVNException { if (ourUUIDStateNode[0] == 0) { initState(); } long timestamp = getCurrentTime(); byte[] uuidData = new byte[16]; uuidData[0] = (byte) timestamp; uuidData[1] = (byte) (timestamp >> 8); uuidData[2] = (byte) (timestamp >> 16); uuidData[3] = (byte) (timestamp >> 24); uuidData[4] = (byte) (timestamp >> 32); uuidData[5] = (byte) (timestamp >> 40); uuidData[6] = (byte) (timestamp >> 48); uuidData[7] = (byte) (((timestamp >> 56) & 0x0F) | 0x10); uuidData[8] = (byte) (((ourUUIDStateSeqNum >> 8) & 0x3F) | 0x80); uuidData[9] = (byte) ourUUIDStateSeqNum; System.arraycopy(ourUUIDStateNode, 0, uuidData, 10, NODE_LENGTH); return uuidData; }
private static void initState() throws SVNException { /* * Offset between UUID formatted times and System.currentTimeMillis() * formatted times. UUID UTC base time is October 15, 1582. * System.currentTimeMillis() base time is January 1, 1970. */ long currentTime = System.currentTimeMillis() * 10 + 0x01B21DD213814000L; Random randomGen = new Random(); randomGen.setSeed(((currentTime >> 32) ^ currentTime) & 0xffffffffL); ourUUIDStateSeqNum = randomGen.nextLong() & 0x0FFFFL; getRandomInfo(ourUUIDStateNode); }
if (useUUIDGenerator) { fileName.append("."); fileName.append(SVNUUIDGenerator.generateUUIDString()); fileName.append("."); if (useUUIDGenerator) { fileName.append(SVNUUIDGenerator.generateUUIDString()); } else { fileName.append(i);
public static String generateUUIDString() throws SVNException { return formatUUID(generateUUID()); }
public static synchronized byte[] generateUUID() throws SVNException { if (ourUUIDStateNode[0] == 0) { initState(); } long timestamp = getCurrentTime(); byte[] uuidData = new byte[16]; uuidData[0] = (byte) timestamp; uuidData[1] = (byte) (timestamp >> 8); uuidData[2] = (byte) (timestamp >> 16); uuidData[3] = (byte) (timestamp >> 24); uuidData[4] = (byte) (timestamp >> 32); uuidData[5] = (byte) (timestamp >> 40); uuidData[6] = (byte) (timestamp >> 48); uuidData[7] = (byte) (((timestamp >> 56) & 0x0F) | 0x10); uuidData[8] = (byte) (((ourUUIDStateSeqNum >> 8) & 0x3F) | 0x80); uuidData[9] = (byte) ourUUIDStateSeqNum; System.arraycopy(ourUUIDStateNode, 0, uuidData, 10, NODE_LENGTH); return uuidData; }
private static void initState() throws SVNException { /* * Offset between UUID formatted times and System.currentTimeMillis() * formatted times. UUID UTC base time is October 15, 1582. * System.currentTimeMillis() base time is January 1, 1970. */ long currentTime = System.currentTimeMillis() * 10 + 0x01B21DD213814000L; Random randomGen = new Random(); randomGen.setSeed(((currentTime >> 32) ^ currentTime) & 0xffffffffL); ourUUIDStateSeqNum = randomGen.nextLong() & 0x0FFFFL; getRandomInfo(ourUUIDStateNode); }
if (useUUIDGenerator) { fileName.append("."); fileName.append(SVNUUIDGenerator.generateUUIDString()); fileName.append("."); if (useUUIDGenerator) { fileName.append(SVNUUIDGenerator.generateUUIDString()); } else { fileName.append(i);
public static String generateUUIDString() throws SVNException { return formatUUID(generateUUID()); }
public static synchronized byte[] generateUUID() throws SVNException { if (ourUUIDStateNode[0] == 0) { initState(); } long timestamp = getCurrentTime(); byte[] uuidData = new byte[16]; uuidData[0] = (byte) timestamp; uuidData[1] = (byte) (timestamp >> 8); uuidData[2] = (byte) (timestamp >> 16); uuidData[3] = (byte) (timestamp >> 24); uuidData[4] = (byte) (timestamp >> 32); uuidData[5] = (byte) (timestamp >> 40); uuidData[6] = (byte) (timestamp >> 48); uuidData[7] = (byte) (((timestamp >> 56) & 0x0F) | 0x10); uuidData[8] = (byte) (((ourUUIDStateSeqNum >> 8) & 0x3F) | 0x80); uuidData[9] = (byte) ourUUIDStateSeqNum; System.arraycopy(ourUUIDStateNode, 0, uuidData, 10, NODE_LENGTH); return uuidData; }
private static void initState() throws SVNException { /* * Offset between UUID formatted times and System.currentTimeMillis() * formatted times. UUID UTC base time is October 15, 1582. * System.currentTimeMillis() base time is January 1, 1970. */ long currentTime = System.currentTimeMillis() * 10 + 0x01B21DD213814000L; Random randomGen = new Random(); randomGen.setSeed(((currentTime >> 32) ^ currentTime) & 0xffffffffL); ourUUIDStateSeqNum = randomGen.nextLong() & 0x0FFFFL; getRandomInfo(ourUUIDStateNode); }
try { if (uuid == null) { uuid = SVNUUIDGenerator.generateUUIDString(); } else { String[] components = uuid.split("-");
private static String generateUUID() { try { return SVNUUIDGenerator.formatUUID(SVNUUIDGenerator.generateUUID()); } catch (SVNException svne) { long time = System.currentTimeMillis(); String uuid = Long.toHexString(time); int zeroes = 16 - uuid.length(); for(int i = 0; i < zeroes; i++) { uuid = "0" + uuid; } return uuid; } }
try { if (uuid == null) { uuid = SVNUUIDGenerator.generateUUIDString(); } else { String[] components = uuid.split("-");
private static String generateUUID() { try { return SVNUUIDGenerator.formatUUID(SVNUUIDGenerator.generateUUID()); } catch (SVNException svne) { long time = System.currentTimeMillis(); String uuid = Long.toHexString(time); int zeroes = 16 - uuid.length(); for(int i = 0; i < zeroes; i++) { uuid = "0" + uuid; } return uuid; } }