Java Code Examples for java.util.concurrent.RejectedExecutionException#initCause()
The following examples show how to use
java.util.concurrent.RejectedExecutionException#initCause() .
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: ScheduledThreadPoolExecutorWithKeepAlive.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException("executor has been shutdown"); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException("interrupted"); e.initCause(ie); throw e; } } }
Example 2
Source File: PooledExecutorWithDMStats.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 3
Source File: PooledExecutorWithDMStats.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { PooledExecutorWithDMStats pool = (PooledExecutorWithDMStats)executor; pool.bufferQueue.put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 4
Source File: FunctionExecutionPooledExecutor.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 5
Source File: FunctionExecutionPooledExecutor.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { FunctionExecutionPooledExecutor pool = (FunctionExecutionPooledExecutor)executor; pool.bufferQueue.put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 6
Source File: ScheduledThreadPoolExecutorWithKeepAlive.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException("executor has been shutdown"); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException("interrupted"); e.initCause(ie); throw e; } } }
Example 7
Source File: PooledExecutorWithDMStats.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 8
Source File: PooledExecutorWithDMStats.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { PooledExecutorWithDMStats pool = (PooledExecutorWithDMStats)executor; pool.bufferQueue.put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 9
Source File: FunctionExecutionPooledExecutor.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { executor.getQueue().put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }
Example 10
Source File: FunctionExecutionPooledExecutor.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { if (executor.isShutdown()) { throw new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_EXECUTOR_HAS_BEEN_SHUTDOWN.toLocalizedString()); } else { try { FunctionExecutionPooledExecutor pool = (FunctionExecutionPooledExecutor)executor; pool.bufferQueue.put(r); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); RejectedExecutionException e = new RejectedExecutionException(LocalizedStrings.PooledExecutorWithDMStats_INTERRUPTED.toLocalizedString()); e.initCause(ie); throw e; } } }