public AsyncTask scheduleRepeating(final Runnable runnable, final TimeUnit unit, final long initial, final long interval) { checkLoad(); mutex.lock(); try { TimedTask task; scheduledTasks.offer(task = new RepeatingTimedTask(runnable, unit.toMillis(initial), unit.toMillis(interval))); return task; } finally { mutex.unlock(); } }
/** * @param data * The contents of a .properties file. * @return A map of key-value pairs parsed from the .properties file contents. */ public static Map<String, String> load(final String data) { final ParseState parseState = new ParseState(data); while (parseState.next()); return parseState.properties; }
@Override public void callback(final T beanInstance) { value = beanInstance; if (creationalCallback != null) { creationalCallback.callback(beanInstance); } } };
public static Byte[] decodeAsBoxed(final String data) { final byte[] primitiveArray = decode(data); final Byte[] boxedData = new Byte[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) { boxedData[i] = primitiveArray[i]; } return boxedData; }
public AnnotationPropertyAccessor build() { return new AnnotationPropertyAccessor(createOrderedPropertyMap()); }
public long toMillis(final long d) { return x(d, C6 / C2, Long.MAX_VALUE / (C6 / C2)); }
public long toSeconds(final long d) { return x(d, C4 / C3, Long.MAX_VALUE / (C4 / C3)); }
public long toMicros(final long d) { return x(d, C5 / C1, Long.MAX_VALUE / (C5 / C1)); }
public static AnnotationPropertyAccessorBuilder create() { return new AnnotationPropertyAccessorBuilder(); }
public long toNanos(final long d) { return x(d, C3, Long.MAX_VALUE / (C3)); }
public long convert(final long d, final TimeUnit u) { return u.toNanos(d); }
public static Byte[] decodeAsBoxed(final String data) { final byte[] primitiveArray = decode(data); final Byte[] boxedData = new Byte[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) { boxedData[i] = primitiveArray[i]; } return boxedData; }
public AsyncTask schedule(final Runnable runnable, TimeUnit unit, long interval) { checkLoad(); mutex.lock(); try { TimedTask task; scheduledTasks.offer(task = new DelayedTask(runnable, unit.toMillis(interval))); return task; } finally { mutex.unlock(); } }
/** * @param data * The contents of a .properties file. * @return A map of key-value pairs parsed from the .properties file contents. */ public static Map<String, String> load(final String data) { final ParseState parseState = new ParseState(data); while (parseState.next()); return parseState.properties; }
@SuppressWarnings("unchecked") public void onSuccess() { callback.callback(bean); } public void onFailure(Throwable caught) {
public AnnotationPropertyAccessor build() { return new AnnotationPropertyAccessor(createOrderedPropertyMap()); }
public long toSeconds(final long d) { return x(d, C6 / C3, Long.MAX_VALUE / (C6 / C3)); }
public long toMillis(final long d) { return x(d, C4 / C2, Long.MAX_VALUE / (C4 / C2)); }
public long toMicros(final long d) { return x(d, C5 / C1, Long.MAX_VALUE / (C5 / C1)); }
public long toHours(final long d) { return x(d, C6 / C5, Long.MAX_VALUE / (C6 / C5)); }