Compare commits
8 Commits
1.20.0
...
EventQueue
Author | SHA1 | Date | |
---|---|---|---|
5a56b922e4 | |||
c0da4b3165 | |||
9bbb4da3d5 | |||
db33cc533b | |||
8433c7b712 | |||
ee74fec53c | |||
7a7e891384 | |||
1d12d94bac |
@ -8,7 +8,6 @@
|
||||
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
||||
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://sonarcloud.io/dashboard/index/com.iluwatar%3Ajava-design-patterns)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/1503)
|
||||
|
||||
# Introduction
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>abstract-document</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>abstract-factory</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>acyclic-visitor</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>adapter</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>aggregator-microservices</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>aggregator-microservices</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>aggregator-microservices</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>aggregator-microservices</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ambassador</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>api-gateway</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>api-gateway-service</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>api-gateway</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>api-gateway</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>api-gateway</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>async-method-invocation</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>bridge</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>builder</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>business-delegate</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>caching</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>callback</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>chain</artifactId>
|
||||
<dependencies>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>collection-pipeline</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>command</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>composite</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<dependencies>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>cqrs</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>dao</artifactId>
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>data-bus</artifactId>
|
||||
<dependencies>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>data-mapper</artifactId>
|
||||
<dependencies>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>data-transfer-object</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>decorator</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>dependency-injection</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,11 +29,11 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>dirty-flag</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
<name>dirty-flag</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>double-checked-locking</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>double-dispatch</artifactId>
|
||||
<dependencies>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>eip-message-channel</artifactId>
|
||||
<dependencies>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>eip-publish-subscribe</artifactId>
|
||||
<dependencies>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>event-aggregator</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>event-asynchronous</artifactId>
|
||||
<dependencies>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>event-driven-architecture</artifactId>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 23 KiB |
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>event-queue</artifactId>
|
||||
<dependencies>
|
||||
|
@ -47,13 +47,15 @@ public class App {
|
||||
* @throws IOException when there is a problem with the audio file loading
|
||||
* @throws UnsupportedAudioFileException when the loaded audio file is unsupported
|
||||
*/
|
||||
public static void main(String[] args) throws UnsupportedAudioFileException, IOException {
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Closed-Hi-Hat-1.wav"), -8.0f);
|
||||
public static void main(String[] args) throws UnsupportedAudioFileException, IOException, InterruptedException {
|
||||
Audio audio = Audio.getInstance();
|
||||
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
|
||||
audio.playSound(audio.getAudioStream("./etc/Closed-Hi-Hat-1.wav"), -8.0f);
|
||||
|
||||
System.out.println("Press Enter key to stop the program...");
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
|
||||
br.read();
|
||||
Audio.stopService();
|
||||
}
|
||||
audio.stopService();
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
package com.iluwatar.event.queue;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -38,49 +41,56 @@ import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
*
|
||||
*/
|
||||
public class Audio {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(Audio.class);
|
||||
private static final Audio INSTANCE = new Audio();
|
||||
|
||||
private static final int MAX_PENDING = 16;
|
||||
|
||||
private static int headIndex;
|
||||
private int headIndex;
|
||||
|
||||
private static int tailIndex;
|
||||
private int tailIndex;
|
||||
|
||||
private static Thread updateThread = null;
|
||||
private volatile Thread updateThread = null;
|
||||
|
||||
private static PlayMessage[] pendingAudio = new PlayMessage[MAX_PENDING];
|
||||
private PlayMessage[] pendingAudio = new PlayMessage[MAX_PENDING];
|
||||
|
||||
// Visible only for testing purposes
|
||||
Audio() {
|
||||
|
||||
}
|
||||
|
||||
public static Audio getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method stops the Update Method's thread.
|
||||
* This method stops the Update Method's thread and waits till service stops.
|
||||
*/
|
||||
public static synchronized void stopService() {
|
||||
public synchronized void stopService() throws InterruptedException {
|
||||
if (updateThread != null) {
|
||||
updateThread.interrupt();
|
||||
}
|
||||
updateThread.join();
|
||||
updateThread = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method check the Update Method's thread is started.
|
||||
* @return boolean
|
||||
*/
|
||||
public static synchronized boolean isServiceRunning() {
|
||||
if (updateThread != null && updateThread.isAlive() ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
public synchronized boolean isServiceRunning() {
|
||||
return updateThread != null && updateThread.isAlive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the thread for the Update Method pattern if it was not started previously.
|
||||
* Also when the thread is is ready initializes the indexes of the queue
|
||||
*/
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (updateThread == null) {
|
||||
updateThread = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
updateThread = new Thread(() -> {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
Audio.update();
|
||||
}
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -90,7 +100,7 @@ public class Audio {
|
||||
/**
|
||||
* This is a synchronized thread starter
|
||||
*/
|
||||
public static synchronized void startThread() {
|
||||
private synchronized void startThread() {
|
||||
if (!updateThread.isAlive()) {
|
||||
updateThread.start();
|
||||
headIndex = 0;
|
||||
@ -103,7 +113,7 @@ public class Audio {
|
||||
* @param stream is the AudioInputStream for the method
|
||||
* @param volume is the level of the audio's volume
|
||||
*/
|
||||
public static void playSound(AudioInputStream stream, float volume) {
|
||||
public void playSound(AudioInputStream stream, float volume) {
|
||||
init();
|
||||
// Walk the pending requests.
|
||||
for (int i = headIndex; i != tailIndex; i = (i + 1) % MAX_PENDING) {
|
||||
@ -123,7 +133,7 @@ public class Audio {
|
||||
* This method uses the Update Method pattern.
|
||||
* It takes the audio from the queue and plays it
|
||||
*/
|
||||
public static void update() {
|
||||
private void update() {
|
||||
// If there are no pending requests, do nothing.
|
||||
if (headIndex == tailIndex) {
|
||||
return;
|
||||
@ -136,13 +146,11 @@ public class Audio {
|
||||
clip.open(audioStream);
|
||||
clip.start();
|
||||
} catch (LineUnavailableException e) {
|
||||
System.err.println("Error occoured while loading the audio: The line is unavailable");
|
||||
e.printStackTrace();
|
||||
LOGGER.trace("Error occoured while loading the audio: The line is unavailable", e);
|
||||
} catch (IOException e) {
|
||||
System.err.println("Input/Output error while loading the audio");
|
||||
e.printStackTrace();
|
||||
LOGGER.trace("Input/Output error while loading the audio", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.err.println("The system doesn't support the sound: " + e.getMessage());
|
||||
LOGGER.trace("The system doesn't support the sound: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +161,7 @@ public class Audio {
|
||||
* @throws UnsupportedAudioFileException when the audio file is not supported
|
||||
* @throws IOException when the file is not readable
|
||||
*/
|
||||
public static AudioInputStream getAudioStream(String filePath)
|
||||
public AudioInputStream getAudioStream(String filePath)
|
||||
throws UnsupportedAudioFileException, IOException {
|
||||
return AudioSystem.getAudioInputStream(new File(filePath).getAbsoluteFile());
|
||||
}
|
||||
@ -162,7 +170,7 @@ public class Audio {
|
||||
* Returns with the message array of the queue
|
||||
* @return PlayMessage[]
|
||||
*/
|
||||
public static PlayMessage[] getPendingAudio() {
|
||||
public PlayMessage[] getPendingAudio() {
|
||||
return pendingAudio;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
package com.iluwatar.event.queue;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
@ -39,6 +40,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
*/
|
||||
public class AudioTest {
|
||||
|
||||
private Audio audio;
|
||||
|
||||
@BeforeEach
|
||||
void createAudioInstance() {
|
||||
audio = new Audio();
|
||||
}
|
||||
/**
|
||||
* Test here that the playSound method works correctly
|
||||
* @throws UnsupportedAudioFileException when the audio file is not supported
|
||||
@ -47,13 +54,15 @@ public class AudioTest {
|
||||
*/
|
||||
@Test
|
||||
public void testPlaySound() throws UnsupportedAudioFileException, IOException, InterruptedException {
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
|
||||
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
|
||||
// test that service is started
|
||||
assertTrue(Audio.isServiceRunning());
|
||||
assertTrue(audio.isServiceRunning());
|
||||
// adding a small pause to be sure that the sound is ended
|
||||
Thread.sleep(5000);
|
||||
|
||||
audio.stopService();
|
||||
// test that service is finished
|
||||
assertFalse(!Audio.isServiceRunning());
|
||||
assertFalse(audio.isServiceRunning());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,16 +73,18 @@ public class AudioTest {
|
||||
*/
|
||||
@Test
|
||||
public void testQueue() throws UnsupportedAudioFileException, IOException, InterruptedException {
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
assertTrue(Audio.getPendingAudio().length > 0);
|
||||
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
|
||||
assertTrue(audio.getPendingAudio().length > 0);
|
||||
// test that service is started
|
||||
assertTrue(Audio.isServiceRunning());
|
||||
assertTrue(audio.isServiceRunning());
|
||||
// adding a small pause to be sure that the sound is ended
|
||||
Thread.sleep(10000);
|
||||
|
||||
audio.stopService();
|
||||
// test that service is finished
|
||||
assertFalse(!Audio.isServiceRunning());
|
||||
assertFalse(audio.isServiceRunning());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>event-sourcing</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>execute-around</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>facade</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>factory-kit</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>factory-method</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>flux</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>flyweight</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>front-controller</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>guarded-suspension</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>half-sync-half-async</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>hexagonal</artifactId>
|
||||
<dependencies>
|
||||
|
@ -22,13 +22,12 @@
|
||||
*/
|
||||
package com.iluwatar.hexagonal.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.PrimitiveIterator;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -85,11 +84,10 @@ public class LotteryNumbers {
|
||||
* @return numbers as comma separated string
|
||||
*/
|
||||
public String getNumbersAsString() {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.addAll(numbers);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
Iterator<Integer> iterator = numbers.iterator();
|
||||
for (int i = 0; i < NUM_NUMBERS; i++) {
|
||||
builder.append(list.get(i));
|
||||
builder.append(iterator.next());
|
||||
if (i < NUM_NUMBERS - 1) {
|
||||
builder.append(",");
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>intercepting-filter</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>interpreter</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>iterator</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>com.iluwatar.layers</groupId>
|
||||
<artifactId>layers</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>lazy-loading</artifactId>
|
||||
<dependencies>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>mediator</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>memento</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>model-view-controller</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>model-view-presenter</artifactId>
|
||||
<name>model-view-presenter</name>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>module</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>monad</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>monostate</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>multiton</artifactId>
|
||||
<dependencies>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>mute-idiom</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>mutex</artifactId>
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>naked-objects</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naked-objects-dom</artifactId>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>naked-objects</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naked-objects-fixture</artifactId>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>naked-objects</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naked-objects-integtests</artifactId>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naked-objects</artifactId>
|
||||
@ -350,17 +350,17 @@
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>naked-objects-dom</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>naked-objects-fixture</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>naked-objects-webapp</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>naked-objects</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naked-objects-webapp</artifactId>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>null-object</artifactId>
|
||||
<dependencies>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>object-mother</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>object-pool</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>observer</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>page-object</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>poison-pill</artifactId>
|
||||
<dependencies>
|
||||
|
2
pom.xml
2
pom.xml
@ -21,7 +21,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<inceptionYear>2014</inceptionYear>
|
||||
<properties>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>private-class-data</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>producer-consumer</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>promise</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>property</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>prototype</artifactId>
|
||||
<dependencies>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>com.iluwatar</groupId>
|
||||
<artifactId>java-design-patterns</artifactId>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>proxy</artifactId>
|
||||
<dependencies>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user