/* Filename: NonBlockingQueue.java, STUDENT must implement this class. ************************************************************ Author: Dr. Parson Student co-author: Major: Professor Creation Date: 2/23/2024 Due Date: 3/28/2024 after spring break Course: CSC543 spring 2024 Professor Name: D. Parson Assignment: #3 Interface INonBlockingTupleExchange for NonBlockingQueue, NonBlockingAtomicReference, and NonBlockingAtomicReferenceArray implementing classes. */ package CSC543s24NonBlockingDataflowAssn3 ; import net.jcip.annotations.* ; import java.util.Queue ; // https://docs.oracle.com/javase/8/docs/api/index.html?java/util/Queue.html public class NonBlockingQueue implements INonBlockingTupleExchange { /* TupleType will be FiveTuple or TenTuple in this assignment. */ public NonBlockingQueue(Queue q) { // STUDENT 1 (15%): Tag class as @ThreadSafe, store constructor // parameter or parameters in thread-safe fields, // and implement spinUntilPut and spinUntilTake as // described in interface INonBlockingTupleExchange and below. } public void spinUntilPut(TupleType tuple) { /* * spinUntilPut spins until it succeeds in calling non-blocking * offer() into a supporting Queue. */ } public TupleType spinUntilTake() { return null ; // STUDENT Delete this line when you code this class. /* * spinUntilTake spins until it succeeds in calling non-blocking * poll() out of a supporting Queue. */ } }