Java 类com.sun.jmx.snmp.tasks.Task 实例源码

项目:OpenJSharp    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:OpenJSharp    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:jdk8u-jdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:jdk8u-jdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:jdk8u_jdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:jdk8u_jdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:lookaside_java-1.8.0-openjdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:infobip-open-jdk-8    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:infobip-open-jdk-8    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:jdk8u-dev-jdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:jdk8u-dev-jdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:jdk7-jdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:jdk7-jdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:openjdk-source-code-learn    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:openjdk-source-code-learn    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:OLD-OpenJDK8    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:OLD-OpenJDK8    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:event4j    文件:DelegatorTest.java   
private ThreadPool createThreadPoolMock(String threadPoolName, int callTimes) {
    ThreadPool mock = createMock(ThreadPool.class);
    mock.submit( anyObject(Task.class), eq(threadPoolName));
    expectLastCall().andReturn(createMock(Future.class)).times(callTimes);
    replay(mock);

    return mock;
}
项目:openjdk-jdk7u-jdk    文件:ThreadService.java   
public Runnable removeTask(Runnable task) {
    stateCheck();

    Runnable removed = null;
    synchronized(jobList) {
        int lg = jobList.indexOf(task);
        if (lg >= 0) {
            removed = jobList.remove(lg);
        }
    }
    if (removed != null && removed instanceof Task)
        ((Task) removed).cancel();
    return removed;
}
项目:openjdk-jdk7u-jdk    文件:ThreadService.java   
public void removeAll() {
    stateCheck();

    final Object[] jobs;
    synchronized(jobList) {
        jobs = jobList.toArray();
        jobList.clear();
    }
    final int len = jobs.length;
    for (int i=0; i<len ; i++) {
        final Object o = jobs[i];
        if (o!= null && o instanceof Task) ((Task)o).cancel();
    }
}
项目:OpenJSharp    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:jdk8u-jdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:jdk8u_jdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:lookaside_java-1.8.0-openjdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:infobip-open-jdk-8    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:jdk8u-dev-jdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:jdk7-jdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:openjdk-source-code-learn    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:OLD-OpenJDK8    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}
项目:openjdk-jdk7u-jdk    文件:ThreadService.java   
/**
 * Submit a task to be executed.
 * Once a task is submitted, it is guaranteed that either
 * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
 * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
 * This implementation of TaskServer uses a thread pool to execute
 * the submitted tasks.
 * @param task The task to be executed.
 * @exception IllegalArgumentException if the submitted task is null.
 **/
public void submitTask(Task task) throws IllegalArgumentException {
    submitTask((Runnable)task);
}