How can I make a new Java API program ready for distributed execution? Currently, the entire code is within the main() method. With the record API I had a getPlan() method and returned the plan. How to do that with new API?