Generates an unused algorithm id.

@return an algorithm id <code>String</code>.
16909
String getNextAlgorithmObjectId() {
		if (idsToAlgorithms.size() == Integer.MAX_VALUE) {
			throw new IllegalArgumentException(
					"Maximum number of algorithm objects reached");
		}
		while (true) {
			String candidate = "ALGORITHM_" + currentAlgorithmId++;
			if (isUniqueAlgorithmObjectId(candidate)) {
				return candidate;
			}
		}
	}
955369
public static KeyGenerator getKeyGenerator(String algorithm) {
		final Provider provider = GlobalBouncyCastleProvider.INSTANCE.getProvider();

		KeyGenerator generator;
		try {
			generator = (null == provider) //
					? KeyGenerator.getInstance(getMainAlgorithm(algorithm)) //
					: KeyGenerator.getInstance(getMainAlgorithm(algorithm), provider);
		} catch (NoSuchAlgorithmException e) {
			throw new CryptoException(e);
		}
		return generator;
	}
1168134
public String generateId() throws IOException {
        HashCode currentHash = this.getRawComponentHash();
        currentHash = AceFunctions.generateHCId(currentHash.asBytes(), this.ic.getRawComponentHash().asBytes());
        for(AceRecord r: this.ic.getSoilLayers()) {
            currentHash = AceFunctions.generateHCId(currentHash.asBytes(), r.getRawComponentHash().asBytes());
        }
        for(AceEvent e: this.events.asList()) {
            currentHash = AceFunctions.generateHCId(currentHash.asBytes(), e.getRawComponentHash().asBytes());
        }
        currentHash = AceFunctions.generateHCId(currentHash.asBytes(), this.observed.getRawComponentHash().asBytes());
        for(AceRecord r: this.observed.getTimeseries()) {
            currentHash = AceFunctions.generateHCId(currentHash.asBytes(), r.getRawComponentHash().asBytes());
        }
        return currentHash.toString();
    }
694929
public String genId() {
        S.Buffer sb = S.newBuffer();
        sb.a(longEncoder.longToStr(nodeIdProvider.nodeId()))
          .a(longEncoder.longToStr(startIdProvider.startId()))
          .a(longEncoder.longToStr(sequenceProvider.seqId()));
        return sb.toString();
    }
214804
public long getPreviousSequenceID()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPreviousSequenceID");
    long previousSequenceID=0;
    previousSequenceID = msgItem.getMessage().getGuaranteedValueStartTick()-1;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPreviousSequenceID", new Long(previousSequenceID));
    return previousSequenceID;
  }
266396
static String id(Object o) {
        if (o == null) return "(null)";
        Thread t = Thread.currentThread();
        StringBuilder sb = new StringBuilder(128);
        sb.append("(T[").append(t.getName()).append("]@");
        sb.append(Long.toString(t.getId(), Character.MAX_RADIX));
        sb.append(":O[").append(o.getClass().getSimpleName());
        sb.append("]@");
        sb.append(Long.toString(System.identityHashCode(o),Character.MAX_RADIX));
        sb.append(")");
        return sb.toString();
    }
1165197
public String getIDPath()
    {
        String strIDPath = this.getID();
        if (this.getParentProxy() != null)
        {
            String strParentPath = this.getParentProxy().getIDPath();
            if (strParentPath != null)
                strIDPath = strParentPath + PATH_SEPARATOR + strIDPath;
        }
        return strIDPath;
    }
990723
public String nextId() {
        String id = "-1";
        do {
            // when we reach max int, reset to zero
            if (nextId.get() == Integer.MAX_VALUE) {
                nextId.set(0);
            }
            id = String.format("%d", nextId.getAndIncrement());
        } while (hasClient(id));
        return id;
    }
1039999
private int getFreeId() {

        int tryID = (int)(10000 + (Math.random() * 90000));
        while (!CmsResourceTypeApp.isResourceTypeIdFree(tryID)) {
            tryID = (int)(10000 + (Math.random() * 90000));
        }
        return tryID;
    }
1243486
public long getPID() {
		long currentPID = cachedPID.get();
		if (currentPID != 0) {
			return currentPID;
		}
		try {
			currentPID = detectPID();
		} catch (Throwable cause) {
			logger.info("Unable to detect process ID!", cause);
		}
		if (currentPID == 0) {
			currentPID = System.nanoTime();
			if (!cachedPID.compareAndSet(0, currentPID)) {
				currentPID = cachedPID.get();
			}
		} else {
			cachedPID.set(currentPID);
		}
		return currentPID;
	}
1069768
private String generateDigest(String algorithmName, X509Certificate cert) {
        try {
            MessageDigest md = MessageDigest.getInstance(algorithmName);
            md.update(cert.getEncoded());
            byte data[] = md.digest();

            StringBuilder buffer = new StringBuilder(3 * data.length);
            int i = 0;
            buffer.append(HEX_CHARS[(data[i] >> 4) & 0xF]);
            buffer.append(HEX_CHARS[(data[i] % 16) & 0xF]);
            for (++i; i < data.length; i++) {
                buffer.append(':');
                buffer.append(HEX_CHARS[(data[i] >> 4) & 0xF]);
                buffer.append(HEX_CHARS[(data[i] % 16) & 0xF]);
            }

            return buffer.toString();
        } catch (NoClassDefFoundError e) {
            return getMessage("sslTrust.genDigestError", algorithmName, e.getMessage());
        } catch (Exception e) {
            return getMessage("sslTrust.genDigestError", algorithmName, e.getMessage());
        }
    }
1054936
private static MessageDigest getDigest(String algorithm) {
        try {
            return MessageDigest.getInstance(algorithm);
        } catch (NoSuchAlgorithmException ex) {
            throw new IllegalStateException("Could not find MessageDigest with algorithm \"" + algorithm + "\"", ex);
        }
    }
81108
public static UUID uuid() {
    @javax.annotation.Nonnull String index = Integer.toHexString(com.simiacryptus.util.Util.idcounter.incrementAndGet());
    while (index.length() < 8) {
      index = "0" + index;
    }
    @javax.annotation.Nonnull final String tempId = com.simiacryptus.util.Util.jvmId.substring(0, com.simiacryptus.util.Util.jvmId.length() - index.length()) + index;
    return UUID.fromString(tempId);
  }
678826
protected String genIdString (int[] userIds)
    {
        // build up the string we need for the query
        StringBuilder ids = new StringBuilder();
        for (int i = 0; i < userIds.length; i++) {
            if (ids.length() > 0) {
                ids.append(",");
            }
            ids.append(userIds[i]);
        }

        return ids.toString();
    }
956269
public static String formatter(Algorithm algorithm, Mode mode) {
        return String.format("%s/%s", algorithm, mode);
    }
457098
public String getId() {

    String id = this.argument.id();
    if ((id == null) || (id.length() == 0)) {
      id = this.argument.name();
    }
    return id;
  }
718169
public synchronized Long generateId() {
        if (sequenceBlock == null || !sequenceBlock.hasNext()) {
            sequenceBlock = allocateSequenceBlock();
        }
        return sequenceBlock.next();
    }