core/src/main/java/org/sakaiproject/nakamura/api/lite/util/Type1UUID.java
private static synchronized void initializeForType1() {
        if (type1Initialized == true) {
            return;
        }
        // note that secure random is very slow the first time
        // it is used; consider switching to a standard random
        RANDOM = new SecureRandom();
        _seq = (short) RANDOM.nextInt(MAX_14BIT);

        byte[] ip = null;
        try {
            ip = InetAddress.getLocalHost().getAddress();
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }

        IP = new byte[6];
        RANDOM.nextBytes(IP);
        System.arraycopy(ip, 0, IP, 2, ip.length);
        type1Initialized = true;
    }
private static synchronized void initializeForType1() {
        if (type1Initialized == true) {
            return;
        }
        // note that secure random is very slow the first time
        // it is used; consider switching to a standard random
        RANDOM = new SecureRandom();
        _seq = (short) RANDOM.nextInt(MAX_14BIT);

        byte[] ip = null;
        try {
            ip = InetAddress.getLocalHost().getAddress();
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }

        IP = new byte[6];
        RANDOM.nextBytes(IP);
        System.arraycopy(ip, 0, IP, 2, ip.length);
        type1Initialized = true;
    }
private static synchronized void initializeForType1 ( ) { if ( type1Initialized == true ) { return ; } // note that secure random is very slow the first time // it is used; consider switching to a standard random RANDOM = new SecureRandom ( ) ; _seq = ( short ) RANDOM . nextInt ( MAX_14BIT ) ; byte [ ] ip = null ; try { ip = InetAddress . getLocalHost ( ) . getAddress ( ) ; } catch ( IOException ioe ) { throw new NestableRuntimeException ( ioe ) ; } IP = new byte [ 6 ] ; RANDOM . nextBytes ( IP ) ; System . arraycopy ( ip , 0 , IP , 2 , ip . length ) ; type1Initialized = true ; }
/*
Initializer for type 1 UUIDs. Creates random generator and genenerates
the node portion of the UUID using the IP address.
/ * Initializer for type 1 UUIDs . Creates random generator and genenerates the node portion of the UUID using the IP address .