Example & Tutorial understanding programming in easy ways.

What are the different policy in Executor Framework?

There are different policy within ThreadPoolExecutor in java are as follows.

a. ThreadPoolExecutor.AbortPolicy : AbortPolicy is a handler for rejected task. It handles those task which has been rejected.

b. ThreadPoolExecutor.CallerRunsPolicy : This also handles the rejected task and runs the rejected task directly.

c. ThreadPoolExecutor.DiscardOldestPolicy : This handles those rejected task that is oldest and unhandled. It discards those that oldest task.

d. ThreadPoolExecutor.DiscardPolicy : This is the handler for those rejected task that are rejected silently.

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!