/** * Gets a random name. * * @param prefix the prefix to be used if possible * @param maxLen the maximum length for the random generated name * @return the random name */ public static String randomResourceName(String prefix, int maxLen) { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.randomName(prefix, maxLen); }
/** * Gets a random UUID. * * @return the random UUID. */ public static String randomUuid() { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.randomUuid(); }
/** * @return the current date time. */ public static DateTime dateTimeNow() { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.dateTimeNow(); } /**
/** * Creates ExecutableImpl. */ protected ExecutableImpl() { this(SdkContext.randomUuid()); }
/** * Wrapper for sleep, based on delayProvider. * @param milliseconds number of millisecond for which thread should put on sleep. */ public static void sleep(int milliseconds) { delayProvider.sleep(milliseconds); }
@Override public Observable<V> call(U u) { return typeConvertAsync(u); } })
/** * Factory method to generate instance of ResourceNamer. * @param name prefix for the names. * @return instance of ResourceNamer */ public ResourceNamer createResourceNamer(String name) { return new ResourceNamer(name); } }
/** * Wrapper delayed emission, based on delayProvider. * * @param event the event to emit * @param milliseconds the delay in milliseconds * @param <T> the type of event * @return delayed observable */ public static <T> Observable<T> delayedEmitAsync(T event, int milliseconds) { return delayProvider.delayedEmitAsync(event, milliseconds); }
/** * Gets a random name. * * @param prefix the prefix to be used if possible * @param maxLen the maximum length for the random generated name * @return the random name */ public static String randomResourceName(String prefix, int maxLen) { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.randomName(prefix, maxLen); }
/** * Gets a random UUID. * * @return the random UUID. */ public static String randomUuid() { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.randomUuid(); }
/** * @return the current date time. */ public static DateTime dateTimeNow() { ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); return resourceNamer.dateTimeNow(); } /**
/** * Creates CreatableUpdatableImpl. * * @param name the name of the model * @param innerObject the inner model object */ protected CreatableUpdatableImpl(String name, InnerModelT innerObject) { this(name, SdkContext.randomUuid(), innerObject); }
/** * Wrapper for sleep, based on delayProvider. * @param milliseconds number of millisecond for which thread should put on sleep. */ public static void sleep(int milliseconds) { delayProvider.sleep(milliseconds); }
@Override public Observable<FunctionDeploymentSlot> call(SiteInner siteInner) { return converter.typeConvertAsync(siteInner); } });
/** * Factory method to generate instance of ResourceNamer. * @param name prefix for the names. * @return instance of ResourceNamer */ public ResourceNamer createResourceNamer(String name) { return new ResourceNamer(name); } }
/** * Generates the specified number of random resource names with the same prefix. * @param prefix the prefix to be used if possible * @param maxLen the maximum length for the random generated name * @param count the number of names to generate * @return random names */ public static String[] randomResourceNames(String prefix, int maxLen, int count) { String[] names = new String[count]; ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); for (int i = 0; i < count; i++) { names[i] = resourceNamer.randomName(prefix, maxLen); } return names; }
/** * Creates a TaskItem which is index-able using a random UUID. */ public IndexableTaskItem() { this(SdkContext.randomUuid()); }
@Override public void sleep(int milliseconds) { if (isLiveMode) { super.sleep(milliseconds); } }
/** * Generates the specified number of random resource names with the same prefix. * @param prefix the prefix to be used if possible * @param maxLen the maximum length for the random generated name * @param count the number of names to generate * @return random names */ public static String[] randomResourceNames(String prefix, int maxLen, int count) { String[] names = new String[count]; ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer(""); for (int i = 0; i < count; i++) { names[i] = resourceNamer.randomName(prefix, maxLen); } return names; }
/** * Creates ExecutableImpl. */ protected ExecutableImpl() { this(SdkContext.randomUuid()); }