Skip to content

Commit

Permalink
Fix Javadoc, remove unused method, make another non-public
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed Jun 9, 2024
1 parent ecae487 commit 49cf4c9
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/main/java/org/deepsymmetry/beatlink/data/OpusProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public FileSystem getFileSystem() {
private final Map<Integer, RekordboxUsbArchive> usbArchiveMap = new ConcurrentHashMap<>();

/**
* Contains a queue per slot number which allows us to slow down sending VirtualCdj.deliverMediaDetailsUpdate
* when we attach metadata archives until the application is actually ready to do so.
* <p>Contains a queue per slot number which allows us to slow down sending VirtualCdj.deliverMediaDetailsUpdate
* when we attach metadata archives until the application is actually ready to do so.</p>
*
* Queues are initiated in constructor and should never be null.
* <p>Queues are initialized in the constructor and will never be {@code null}.</p>
*/
private final Map<Integer, LinkedBlockingQueue<MediaDetails>> archiveAttachQueueMap = new ConcurrentHashMap<>();

Expand Down Expand Up @@ -223,13 +223,12 @@ public RekordboxUsbArchive findArchive(int usbSlotNumber) {
}

/**
* Grab MediaDetails off of archiveAttachStatusMap and deliver it to VirtualCdj listeners. Message is null
* if not exists.
* Grab {@link MediaDetails} for a slot from {@link #archiveAttachQueueMap} and deliver it to VirtualCdj listeners.
* Message is {@code }null} if that media archive does not exist.
*
* @param usbSlotNumber
* @param usbSlotNumber the USB slot whose queue should be checked
*/
@API(status = API.Status.EXPERIMENTAL)
public void pollAndSendMediaDetails(int usbSlotNumber){
void pollAndSendMediaDetails(int usbSlotNumber){
if (usbSlotNumber > 0 && usbSlotNumber < 4) {
// Only send media details if there is something in the queue.
MediaDetails mediaDetails = archiveAttachQueueMap.get(usbSlotNumber).poll();
Expand Down Expand Up @@ -614,16 +613,6 @@ public int findMatchingUsbSlotForTrack(int rekordboxId, int player, ByteBuffer s
return 0;
}

/**
* Get a message from archive attached queue for your slot message to see if we want to send MediaDetails to liteners.
*
* @return MediaDetails for the specific the USB slot number.
*/
@API(status = API.Status.EXPERIMENTAL)
public synchronized MediaDetails pollFromArchiveAttachedQueue(int usbSlotNumber){

This comment has been minimized.

Copy link
@cprepos

cprepos Jun 9, 2024

Contributor

I think I somehow duplicated efforts on this. pollAndSendMediaDetails does this.

This comment has been minimized.

Copy link
@brunchboy

brunchboy Jun 9, 2024

Author Member

That was my impression! Thanks for confirming.

return archiveAttachQueueMap.get(usbSlotNumber).poll();
}

/**
* Start proxying track metadata from mounted archives for the Opus Quad decks.
*/
Expand Down

0 comments on commit 49cf4c9

Please sign in to comment.