javax.enterprise.concurrent.ManagedExecutors Java Examples
The following examples show how to use
javax.enterprise.concurrent.ManagedExecutors.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConcurrentTaskExecutor.java From spring-analysis-note with MIT License | 5 votes |
public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties; if (task instanceof SchedulingAwareRunnable) { properties = new HashMap<>(4); properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } else { properties = new HashMap<>(2); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #2
Source File: ConcurrentTaskExecutor.java From java-technology-stack with MIT License | 5 votes |
public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties; if (task instanceof SchedulingAwareRunnable) { properties = new HashMap<>(4); properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } else { properties = new HashMap<>(2); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #3
Source File: ConcurrentTaskExecutor.java From lams with GNU General Public License v2.0 | 5 votes |
public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties = new HashMap<String, String>(2); if (task instanceof SchedulingAwareRunnable) { properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #4
Source File: ConcurrentTaskExecutor.java From spring4-understanding with Apache License 2.0 | 5 votes |
public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties = new HashMap<String, String>(2); if (task instanceof SchedulingAwareRunnable) { properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #5
Source File: ConcurrentTaskExecutor.java From audit4j-core with Apache License 2.0 | 5 votes |
/** * Builds the managed task. * * @param task the task * @param identityName the identity name * @return the runnable */ public static Runnable buildManagedTask(Runnable task, String identityName) { Map<String, String> properties = new HashMap<String, String>(2); if (task instanceof SchedulingAwareRunnable) { properties.put(ManagedTask.LONGRUNNING_HINT, Boolean.toString(((SchedulingAwareRunnable) task).isLongLived())); } properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #6
Source File: ConcurrentTaskExecutor.java From spring-analysis-note with MIT License | 4 votes |
public static <T> Callable<T> buildManagedTask(Callable<T> task, String identityName) { Map<String, String> properties = new HashMap<>(2); properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #7
Source File: ConcurrentTaskExecutor.java From java-technology-stack with MIT License | 4 votes |
public static <T> Callable<T> buildManagedTask(Callable<T> task, String identityName) { Map<String, String> properties = new HashMap<>(2); properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #8
Source File: ConcurrentTaskExecutor.java From lams with GNU General Public License v2.0 | 4 votes |
public static <T> Callable<T> buildManagedTask(Callable<T> task, String identityName) { Map<String, String> properties = new HashMap<String, String>(1); properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #9
Source File: ConcurrentTaskExecutor.java From spring4-understanding with Apache License 2.0 | 4 votes |
public static <T> Callable<T> buildManagedTask(Callable<T> task, String identityName) { Map<String, String> properties = new HashMap<String, String>(1); properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }
Example #10
Source File: ConcurrentTaskExecutor.java From audit4j-core with Apache License 2.0 | 2 votes |
/** * Builds the managed task. * * @param <T> the generic type * @param task the task * @param identityName the identity name * @return the callable */ public static <T> Callable<T> buildManagedTask(Callable<T> task, String identityName) { Map<String, String> properties = new HashMap<String, String>(1); properties.put(ManagedTask.IDENTITY_NAME, identityName); return ManagedExecutors.managedTask(task, properties, null); }