List of usage examples for java.util UUID randomUUID
public static UUID randomUUID()
From source file:com.enterra.batch.admin.sample.TrivialJobParametersIncrementer.java
public JobParameters getNext(JobParameters parameters) { Map<String, JobParameter> map = new HashMap<String, JobParameter>(parameters.getParameters()); map.put("run.id", new JobParameter(UUID.randomUUID().getLeastSignificantBits())); return new JobParameters(map); }
From source file:io.sidecar.org.Application.java
public Application(UUID orgId, String name, String description) { Preconditions.checkNotNull(orgId);/* w ww.j a v a 2 s. com*/ this.orgId = orgId; // assign the AppId this.appId = UUID.randomUUID(); Preconditions.checkNotNull(name); Preconditions.checkArgument(StringUtils.isNotBlank(name)); this.name = name; Preconditions.checkNotNull(description); Preconditions.checkArgument(StringUtils.isNotBlank(description)); this.description = description; }
From source file:com.twosigma.cook.jobclient.GroupTest.java
@Before public void setup() { final Group.Builder groupBuilder = new Group.Builder(); groupBuilder.setUUID(UUID.randomUUID()); _initializedGroup = groupBuilder.build(); }
From source file:com.dotosoft.dot4command.base.BaseObject.java
public BaseObject() { this.nodeId = UUID.randomUUID().toString(); }
From source file:com.ebay.logstorm.server.entities.BaseEntity.java
public void ensureDefault() { if (this.getUuid() == null) { this.setUuid(UUID.randomUUID().toString()); } }
From source file:com.mirth.connect.server.util.javascript.MirthContextFactory.java
public MirthContextFactory(URL[] urls, Set<String> resourceIds) { this.id = UUID.randomUUID().toString(); this.urls = urls; this.resourceIds = resourceIds; ClassLoader classLoader = null; if (ArrayUtils.isNotEmpty(urls)) { classLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); } else {//from w w w . jav a2s . c om classLoader = Thread.currentThread().getContextClassLoader(); } initApplicationClassLoader(classLoader); sealedSharedScope = JavaScriptScopeUtil.createSealedSharedScope(this); serializer = new ObjectXMLSerializer(classLoader); try { serializer.init(ControllerFactory.getFactory().createConfigurationController().getServerVersion()); } catch (Exception e) { } }
From source file:it.reply.orchestrator.controller.ControllerTestUtils.java
public static Deployment createDeployment() { return createDeployment(UUID.randomUUID().toString()); }
From source file:com.twosigma.cook.jobclient.JobTest.java
@Before public void setup() { final Job.Builder jobBuilder = new Job.Builder(); jobBuilder.setUUID(UUID.randomUUID()); jobBuilder.setCommand("sleep 10s"); jobBuilder.setMemory(100.0);//from ww w. java 2 s . com jobBuilder.setCpus(1.0); jobBuilder.addEnv("FOO", "test"); jobBuilder.addLabel("foobar", "frobnicator"); jobBuilder.setMaxRuntime(1000L); jobBuilder.addUri(new FetchableURI.Builder().setValue("http://example.com/my_resource").build()); jobBuilder.setApplication(new Application("baz-app", "1.2.3")); jobBuilder.setExpectedRuntime(500L); _initializedJob = jobBuilder.build(); }
From source file:com.gooddata.gdc.DatastoreServiceAT.java
@BeforeClass public void setUp() throws Exception { directory = "/" + UUID.randomUUID().toString(); }
From source file:com.talis.storage.StoredItemTest.java
@Before public void setup() { etag = UUID.randomUUID().toString(); }