org.safehaus.uuid.UUIDGenerator.generateTimeBasedUUID()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中org.safehaus.uuid.UUIDGenerator.generateTimeBasedUUID()方法的一些代码示例,展示了UUIDGenerator.generateTimeBasedUUID()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UUIDGenerator.generateTimeBasedUUID()方法的具体详情如下:
包路径:org.safehaus.uuid.UUIDGenerator
类名称:UUIDGenerator
方法名:generateTimeBasedUUID

UUIDGenerator.generateTimeBasedUUID介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public static UUID getUUID() {
 return ug.generateTimeBasedUUID( eAddr );
}

代码示例来源:origin: pentaho/pentaho-platform

public static UUID getUUID() {
 UUID uuId = UUIDUtil.ug.generateTimeBasedUUID( UUIDUtil.eAddr );
 // while (uuId.toString().equals(olduuId.toString())) {
 // uuId = ug.generateTimeBasedUUID(eAddr);
 // }
 // olduuId = uuId;
 return uuId;
}

代码示例来源:origin: org.springmodules/spring-modules-javaspaces

public Serializable generateUid() {
  return generator.generateTimeBasedUUID();
}

代码示例来源:origin: de.tudarmstadt.ukp.dkpro.lab/dkpro-lab-core

protected String nextId()
{
  return UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
}

代码示例来源:origin: de.tudarmstadt.ukp.dkpro.lab/de.tudarmstadt.ukp.dkpro.lab.core

protected String nextId()
{
  return UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
}

代码示例来源:origin: Alfresco/alfresco-repository

/**
 * Generates a GUID, avoiding undesired imports.
 */
private static String generateGuid()
{
  return UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
}

代码示例来源:origin: org.alfresco/alfresco-repository

/**
 * Generates a GUID, avoiding undesired imports.
 */
private static String generateGuid()
{
  return UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
}

代码示例来源:origin: org.opencms/opencms-solr

/**
 * Creates a new UUID.<p>
 * 
 * Please note that the static init() method has to be called first to initialize the 
 * internet address of the machine.<p>
 */
public CmsUUID() {
  if (m_ethernetAddress == null) {
    // if no ethernet address is available, generate a dummy
    // this is required because otherwise we can't ever de-serialize a CmsUUID outside of OpenCms, 
    // since the empty constructor is called when the de-serialization takes place
    init(getDummyEthernetAddress());
  }
  m_uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(m_ethernetAddress);
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Creates a new UUID.<p>
 *
 * Please note that the static init() method has to be called first to initialize the
 * internet address of the machine.<p>
 */
public CmsUUID() {
  if (m_ethernetAddress == null) {
    // if no ethernet address is available, generate a dummy
    // this is required because otherwise we can't ever de-serialize a CmsUUID outside of OpenCms,
    // since the empty constructor is called when the de-serialization takes place
    init(CmsStringUtil.getEthernetAddress());
  }
  m_uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(m_ethernetAddress);
}

代码示例来源:origin: org.apache.oodt/cas-workflow

public synchronized void addWorkflowInstance(WorkflowInstance wInst)
    throws InstanceRepositoryException {
  // generate UUID for inst
  UUID uuid = UUIDGenerator.getInstance().generateTimeBasedUUID();
  wInst.setId(uuid.toString());
  addWorkflowInstanceToCatalog(wInst);
}

代码示例来源:origin: apache/oodt

public synchronized void addWorkflowInstance(WorkflowInstance wInst)
    throws InstanceRepositoryException {
  // generate UUID for inst
  UUID uuid = UUIDGenerator.getInstance().generateTimeBasedUUID();
  wInst.setId(uuid.toString());
  addWorkflowInstanceToCatalog(wInst);
}

代码示例来源:origin: apache/oodt

public synchronized void addProduct(Product product)
    throws CatalogException {
  if(product.getProductId()!=null && CATALOG_CACHE.containsKey(product.getProductId())) {
    throw new CatalogException(
      "Attempt to add a product that already existed: product: ["
      + product.getProductName() + "]");
  } else {
    // haven't cached this product yet, so let's cache it
    CompleteProduct completeProduct = new CompleteProduct();
    // NOTE: reuse existing ID if possible
    if (product.getProductId() == null) {
      synchronized (completeProduct) {
        // now generate a unique ID for the product
        UUID prodUUID = generator.generateTimeBasedUUID();
        product.setProductId(prodUUID.toString());
      }
    }
    completeProduct.setProduct(product);
    CATALOG_CACHE.put(product.getProductId(), completeProduct);
  }
}

代码示例来源:origin: org.apache.oodt/cas-filemgr

public synchronized void addProduct(Product product)
    throws CatalogException {
  if(product.getProductId()!=null && CATALOG_CACHE.containsKey(product.getProductId())) {
    throw new CatalogException(
      "Attempt to add a product that already existed: product: ["
      + product.getProductName() + "]");
  } else {
    // haven't cached this product yet, so let's cache it
    CompleteProduct completeProduct = new CompleteProduct();
    // NOTE: reuse existing ID if possible
    if (product.getProductId() == null) {
      synchronized (completeProduct) {
        // now generate a unique ID for the product
        UUID prodUUID = generator.generateTimeBasedUUID();
        product.setProductId(prodUUID.toString());
      }
    }
    completeProduct.setProduct(product);
    CATALOG_CACHE.put(product.getProductId(), completeProduct);
  }
}

代码示例来源:origin: info.magnolia/magnolia-module-exchange-simple

final HierarchyManager hierarchyManager, Content existingContent) throws ExchangeException, RepositoryException {
final Iterator<Content> fileListIterator = topContentElement.getChildren(BaseSyndicatorImpl.RESOURCE_MAPPING_FILE_ELEMENT).iterator();
final String uuid = UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
final String handle = existingContent.getHandle();

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

final HierarchyManager hierarchyManager, Content existingContent) throws ExchangeException, RepositoryException {
final Iterator<Content> fileListIterator = topContentElement.getChildren(BaseSyndicatorImpl.RESOURCE_MAPPING_FILE_ELEMENT).iterator();
final String uuid = UUIDGenerator.getInstance().generateTimeBasedUUID().toString();
final String handle = existingContent.getHandle();

相关文章

微信公众号

最新文章

更多