JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
December 13, 2019, 04:48:49 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: The method setBlocking(boolean) deprecated  (Read 90 times)

sundar156

  • JPPF Padawan
  • *
  • Posts: 5
The method setBlocking(boolean) deprecated
« on: November 29, 2019, 06:52:29 AM »

Hi,

I am using JPPF.Client 6.1.3 and I see that setBlocking method is deprecated. How do I make the it a Blocking job henceforth.?

I am getting the below error while using the method.
The method setBlocking(boolean) from the type AbstractJPPFJob<JPPFJob> is deprecated.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2258
    • JPPF Web site
Re: The method setBlocking(boolean) deprecated
« Reply #1 on: November 29, 2019, 07:45:07 AM »

Hello,

As of JPPF 6.1, whether a job is blocking or not is specified at submission time. To submit a blocking job (synchrronous sybmission), you have to use JPPFClient.submit(job), whereas to submit a non-blocking job (asynchronous submission), you would use JPPFClient.submitAsync(job).

For example, to submit a non-blocking/synchronous job, you could do the folowing:

Code: [Select]
try (JPPFClient client = new JPPFClient()) {
  JPPFJob myJob = ...;
  // submit the job and get the results in the same call
  List<Task<?>> results = client.submit(jmyJob);
}

This is also documented here.

Sincerely,
-Laurent
Logged

sundar156

  • JPPF Padawan
  • *
  • Posts: 5
Re: The method setBlocking(boolean) deprecated
« Reply #2 on: December 04, 2019, 06:47:50 AM »

got it.. Thanks a Lot Laurent.
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads