Tabnine Logo
RandomBasedGenerator._toLong
Code IndexAdd Tabnine to your IDE (free)

How to use
_toLong
method
in
com.fasterxml.uuid.impl.RandomBasedGenerator

Best Java code snippets using com.fasterxml.uuid.impl.RandomBasedGenerator._toLong (Showing top 2 results out of 315)

origin: camunda/camunda-bpm-platform

@Override
public UUID generate()
{
  /* 14-Oct-2010, tatu: Surprisingly, variant for reading byte array is
   *   tad faster for SecureRandom... so let's use that then
   */
  long r1, r2;
  if (_secureRandom) {
    final byte[] buffer = new byte[16];
    _random.nextBytes(buffer);
    r1 = _toLong(buffer, 0);
    r2 = _toLong(buffer, 1);
  } else {
    r1 = _random.nextLong();
    r2 = _random.nextLong();
  }
  return UUIDUtil.constructUUID(UUIDType.RANDOM_BASED, r1, r2);
}
origin: cowtowncoder/java-uuid-generator

@Override
public UUID generate()
{
  /* 14-Oct-2010, tatu: Surprisingly, variant for reading byte array is
   *   tad faster for SecureRandom... so let's use that then
   */
  long r1, r2;
  if (_secureRandom) {
    final byte[] buffer = new byte[16];
    _random.nextBytes(buffer);
    r1 = _toLong(buffer, 0);
    r2 = _toLong(buffer, 1);
  } else {
    r1 = _random.nextLong();
    r2 = _random.nextLong();
  }
  return UUIDUtil.constructUUID(UUIDType.RANDOM_BASED, r1, r2);
}
com.fasterxml.uuid.implRandomBasedGenerator_toLong

Popular methods of RandomBasedGenerator

  • generate
  • <init>
  • _toInt

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now