diff --git a/data-bus/src/main/java/com/iluwatar/databus/App.java b/data-bus/src/main/java/com/iluwatar/databus/App.java
index 748bb6af0..b599bdc57 100644
--- a/data-bus/src/main/java/com/iluwatar/databus/App.java
+++ b/data-bus/src/main/java/com/iluwatar/databus/App.java
@@ -34,8 +34,7 @@ import java.time.LocalDateTime;
/**
* The Data Bus pattern
*
- *
{@see http://wiki.c2.com/?DataBusPattern}
- *
+ * @see http://wiki.c2.com/?DataBusPattern
*
The Data-Bus pattern provides a method where different parts of an application may
* pass messages between each other without needing to be aware of the other's existence.
* Similar to the {@code ObserverPattern}, members register themselves with the {@link DataBus}
diff --git a/data-mapper/pom.xml b/data-mapper/pom.xml
index ac0d78c33..aadcabd3d 100644
--- a/data-mapper/pom.xml
+++ b/data-mapper/pom.xml
@@ -28,7 +28,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
data-mapper
diff --git a/data-transfer-object/pom.xml b/data-transfer-object/pom.xml
index 8a484e919..17ad1f83f 100644
--- a/data-transfer-object/pom.xml
+++ b/data-transfer-object/pom.xml
@@ -28,7 +28,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
data-transfer-object
diff --git a/decorator/README.md b/decorator/README.md
index dcf49dbf5..9998b9938 100644
--- a/decorator/README.md
+++ b/decorator/README.md
@@ -36,7 +36,7 @@ Wikipedia says
Let's take the troll example. First of all we have a simple troll implementing the troll interface
-```
+```java
public interface Troll {
void attack();
int getAttackPower();
@@ -66,7 +66,7 @@ public class SimpleTroll implements Troll {
Next we want to add club for the troll. We can do it dynamically by using a decorator
-```
+```java
public class ClubbedTroll implements Troll {
private static final Logger LOGGER = LoggerFactory.getLogger(ClubbedTroll.class);
@@ -97,7 +97,7 @@ public class ClubbedTroll implements Troll {
Here's the troll in action
-```
+```java
// simple troll
Troll troll = new SimpleTroll();
troll.attack(); // The troll tries to grab you!
diff --git a/decorator/pom.xml b/decorator/pom.xml
index 687de3ad8..d4e2a887d 100644
--- a/decorator/pom.xml
+++ b/decorator/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
decorator
diff --git a/delegation/pom.xml b/delegation/pom.xml
index 118f9f75b..6c7c710d5 100644
--- a/delegation/pom.xml
+++ b/delegation/pom.xml
@@ -30,7 +30,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/dependency-injection/pom.xml b/dependency-injection/pom.xml
index 127a9b2b8..e8a499918 100644
--- a/dependency-injection/pom.xml
+++ b/dependency-injection/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
dependency-injection
diff --git a/double-checked-locking/pom.xml b/double-checked-locking/pom.xml
index d7e8414c0..7efd3c31e 100644
--- a/double-checked-locking/pom.xml
+++ b/double-checked-locking/pom.xml
@@ -27,7 +27,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
double-checked-locking
diff --git a/double-dispatch/pom.xml b/double-dispatch/pom.xml
index 85a85d831..c64ab4ce9 100644
--- a/double-dispatch/pom.xml
+++ b/double-dispatch/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
double-dispatch
diff --git a/eip-aggregator/pom.xml b/eip-aggregator/pom.xml
index 8a51b8218..3b043ad7e 100644
--- a/eip-aggregator/pom.xml
+++ b/eip-aggregator/pom.xml
@@ -26,7 +26,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
diff --git a/message-channel/.gitignore b/eip-message-channel/.gitignore
similarity index 100%
rename from message-channel/.gitignore
rename to eip-message-channel/.gitignore
diff --git a/message-channel/README.md b/eip-message-channel/README.md
similarity index 84%
rename from message-channel/README.md
rename to eip-message-channel/README.md
index 09361dd4a..606619619 100644
--- a/message-channel/README.md
+++ b/eip-message-channel/README.md
@@ -1,8 +1,8 @@
---
layout: pattern
-title: Message Channel
-folder: message-channel
-permalink: /patterns/message-channel/
+title: EIP Message Channel
+folder: eip-message-channel
+permalink: /patterns/eip-message-channel/
categories: Integration
tags:
- Java
diff --git a/message-channel/etc/message-channel.png b/eip-message-channel/etc/message-channel.png
similarity index 100%
rename from message-channel/etc/message-channel.png
rename to eip-message-channel/etc/message-channel.png
diff --git a/message-channel/etc/message-channel.ucls b/eip-message-channel/etc/message-channel.ucls
similarity index 100%
rename from message-channel/etc/message-channel.ucls
rename to eip-message-channel/etc/message-channel.ucls
diff --git a/message-channel/pom.xml b/eip-message-channel/pom.xml
similarity index 96%
rename from message-channel/pom.xml
rename to eip-message-channel/pom.xml
index 3e3028f2a..84cde7e2e 100644
--- a/message-channel/pom.xml
+++ b/eip-message-channel/pom.xml
@@ -30,9 +30,9 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
- message-channel
+ eip-message-channel
org.apache.camel
diff --git a/message-channel/src/main/java/com/iluwatar/message/channel/App.java b/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java
similarity index 98%
rename from message-channel/src/main/java/com/iluwatar/message/channel/App.java
rename to eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java
index d2974e20b..d5929d0db 100644
--- a/message-channel/src/main/java/com/iluwatar/message/channel/App.java
+++ b/eip-message-channel/src/main/java/com/iluwatar/eip/message/channel/App.java
@@ -20,7 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package com.iluwatar.message.channel;
+package com.iluwatar.eip.message.channel;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
diff --git a/publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/AppTest.java b/eip-message-channel/src/test/java/com/iluwatar/eip/message/channel/AppTest.java
similarity index 96%
rename from publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/AppTest.java
rename to eip-message-channel/src/test/java/com/iluwatar/eip/message/channel/AppTest.java
index 128385faf..127f427b8 100644
--- a/publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/AppTest.java
+++ b/eip-message-channel/src/test/java/com/iluwatar/eip/message/channel/AppTest.java
@@ -20,7 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package com.iluwatar.publish.subscribe;
+package com.iluwatar.eip.message.channel;
import org.junit.jupiter.api.Test;
diff --git a/publish-subscribe/.gitignore b/eip-publish-subscribe/.gitignore
similarity index 100%
rename from publish-subscribe/.gitignore
rename to eip-publish-subscribe/.gitignore
diff --git a/publish-subscribe/README.md b/eip-publish-subscribe/README.md
similarity index 83%
rename from publish-subscribe/README.md
rename to eip-publish-subscribe/README.md
index 462209074..90ac02c9b 100644
--- a/publish-subscribe/README.md
+++ b/eip-publish-subscribe/README.md
@@ -1,8 +1,8 @@
---
layout: pattern
-title: Publish Subscribe
-folder: publish-subscribe
-permalink: /patterns/publish-subscribe/
+title: EIP Publish Subscribe
+folder: eip-publish-subscribe
+permalink: /patterns/eip-publish-subscribe/
categories: Integration
tags:
- Java
diff --git a/publish-subscribe/etc/publish-subscribe.png b/eip-publish-subscribe/etc/publish-subscribe.png
similarity index 100%
rename from publish-subscribe/etc/publish-subscribe.png
rename to eip-publish-subscribe/etc/publish-subscribe.png
diff --git a/publish-subscribe/etc/publish-subscribe.ucls b/eip-publish-subscribe/etc/publish-subscribe.ucls
similarity index 100%
rename from publish-subscribe/etc/publish-subscribe.ucls
rename to eip-publish-subscribe/etc/publish-subscribe.ucls
diff --git a/publish-subscribe/pom.xml b/eip-publish-subscribe/pom.xml
similarity index 95%
rename from publish-subscribe/pom.xml
rename to eip-publish-subscribe/pom.xml
index 688cda903..82763b22b 100644
--- a/publish-subscribe/pom.xml
+++ b/eip-publish-subscribe/pom.xml
@@ -28,9 +28,9 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
- publish-subscribe
+ eip-publish-subscribe
org.apache.camel
@@ -51,4 +51,4 @@
test
-
\ No newline at end of file
+
diff --git a/publish-subscribe/src/main/java/com/iluwatar/publish/subscribe/App.java b/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java
similarity index 98%
rename from publish-subscribe/src/main/java/com/iluwatar/publish/subscribe/App.java
rename to eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java
index d642846fb..7c7e77a18 100644
--- a/publish-subscribe/src/main/java/com/iluwatar/publish/subscribe/App.java
+++ b/eip-publish-subscribe/src/main/java/com/iluwatar/eip/publish/subscribe/App.java
@@ -20,7 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package com.iluwatar.publish.subscribe;
+package com.iluwatar.eip.publish.subscribe;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
diff --git a/publish-subscribe/src/main/resources/logback.xml b/eip-publish-subscribe/src/main/resources/logback.xml
similarity index 100%
rename from publish-subscribe/src/main/resources/logback.xml
rename to eip-publish-subscribe/src/main/resources/logback.xml
diff --git a/message-channel/src/test/java/com/iluwatar/message/channel/AppTest.java b/eip-publish-subscribe/src/test/java/com/iluwatar/eip/publish/subscribe/AppTest.java
similarity index 96%
rename from message-channel/src/test/java/com/iluwatar/message/channel/AppTest.java
rename to eip-publish-subscribe/src/test/java/com/iluwatar/eip/publish/subscribe/AppTest.java
index 97094b864..783c796ac 100644
--- a/message-channel/src/test/java/com/iluwatar/message/channel/AppTest.java
+++ b/eip-publish-subscribe/src/test/java/com/iluwatar/eip/publish/subscribe/AppTest.java
@@ -20,7 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package com.iluwatar.message.channel;
+package com.iluwatar.eip.publish.subscribe;
import org.junit.jupiter.api.Test;
diff --git a/eip-splitter/pom.xml b/eip-splitter/pom.xml
index 54661f946..ed16337da 100644
--- a/eip-splitter/pom.xml
+++ b/eip-splitter/pom.xml
@@ -26,7 +26,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
diff --git a/eip-wire-tap/pom.xml b/eip-wire-tap/pom.xml
index 688f4ad6d..752d43077 100644
--- a/eip-wire-tap/pom.xml
+++ b/eip-wire-tap/pom.xml
@@ -26,7 +26,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
diff --git a/event-aggregator/pom.xml b/event-aggregator/pom.xml
index c28fded6f..a39738bf8 100644
--- a/event-aggregator/pom.xml
+++ b/event-aggregator/pom.xml
@@ -28,7 +28,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
event-aggregator
diff --git a/event-asynchronous/pom.xml b/event-asynchronous/pom.xml
index 3c07f47bc..9398d25ce 100644
--- a/event-asynchronous/pom.xml
+++ b/event-asynchronous/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
event-asynchronous
diff --git a/event-driven-architecture/pom.xml b/event-driven-architecture/pom.xml
index 4eb2a6946..87aae0070 100644
--- a/event-driven-architecture/pom.xml
+++ b/event-driven-architecture/pom.xml
@@ -31,7 +31,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
event-driven-architecture
diff --git a/event-driven-architecture/src/main/java/com/iluwatar/eda/App.java b/event-driven-architecture/src/main/java/com/iluwatar/eda/App.java
index 5ed2b2ad8..c41b0ed5a 100644
--- a/event-driven-architecture/src/main/java/com/iluwatar/eda/App.java
+++ b/event-driven-architecture/src/main/java/com/iluwatar/eda/App.java
@@ -33,7 +33,7 @@ import com.iluwatar.eda.model.User;
/**
* An event-driven architecture (EDA) is a framework that orchestrates behavior around the
* production, detection and consumption of events as well as the responses they evoke. An event is
- * any identifiable occurrence that has significance for system hardware or software. The
+ * any identifiable occurrence that has significance for system hardware or software. The
* example below uses an {@link EventDispatcher} to link/register {@link Event} objects to their
* respective handlers once an {@link Event} is dispatched, it's respective handler is invoked and
* the {@link Event} is handled accordingly.
diff --git a/event-queue/pom.xml b/event-queue/pom.xml
index 1ef8e28af..a0c1913a7 100644
--- a/event-queue/pom.xml
+++ b/event-queue/pom.xml
@@ -30,7 +30,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
event-queue
diff --git a/event-sourcing/pom.xml b/event-sourcing/pom.xml
index a17d02379..785d72c68 100644
--- a/event-sourcing/pom.xml
+++ b/event-sourcing/pom.xml
@@ -30,7 +30,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
event-sourcing
diff --git a/execute-around/pom.xml b/execute-around/pom.xml
index 2e43c3e4b..358f4eae4 100644
--- a/execute-around/pom.xml
+++ b/execute-around/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
execute-around
diff --git a/extension-objects/pom.xml b/extension-objects/pom.xml
index bd68a2758..74f233775 100644
--- a/extension-objects/pom.xml
+++ b/extension-objects/pom.xml
@@ -29,7 +29,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/facade/README.md b/facade/README.md
index 7caa89d94..505ceee39 100644
--- a/facade/README.md
+++ b/facade/README.md
@@ -32,7 +32,7 @@ Wikipedia says
Taking our goldmine example from above. Here we have the dwarven mine worker hierarchy
-```
+```java
public abstract class DwarvenMineWorker {
private static final Logger LOGGER = LoggerFactory.getLogger(DwarvenMineWorker.class);
@@ -140,7 +140,7 @@ public class DwarvenCartOperator extends DwarvenMineWorker {
To operate all these goldmine workers we have the facade
-```
+```java
public class DwarvenGoldmineFacade {
private final List workers;
@@ -175,7 +175,7 @@ public class DwarvenGoldmineFacade {
Now to use the facade
-```
+```java
DwarvenGoldmineFacade facade = new DwarvenGoldmineFacade();
facade.startNewDay();
// Dwarf gold digger wakes up.
diff --git a/facade/pom.xml b/facade/pom.xml
index deb56a382..d0c459428 100644
--- a/facade/pom.xml
+++ b/facade/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
facade
diff --git a/factory-kit/pom.xml b/factory-kit/pom.xml
index 71973928f..1c8f4248e 100644
--- a/factory-kit/pom.xml
+++ b/factory-kit/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
factory-kit
diff --git a/factory-kit/src/main/java/com/iluwatar/factorykit/App.java b/factory-kit/src/main/java/com/iluwatar/factorykit/App.java
index 03a4ece83..766370111 100644
--- a/factory-kit/src/main/java/com/iluwatar/factorykit/App.java
+++ b/factory-kit/src/main/java/com/iluwatar/factorykit/App.java
@@ -45,7 +45,7 @@ public class App {
/**
* Program entry point.
*
- * @param args @param args command line args
+ * @param args command line args
*/
public static void main(String[] args) {
WeaponFactory factory = WeaponFactory.factory(builder -> {
diff --git a/factory-method/README.md b/factory-method/README.md
index ab3739ac3..087221fb9 100644
--- a/factory-method/README.md
+++ b/factory-method/README.md
@@ -35,7 +35,7 @@ Wikipedia says
Taking our blacksmith example above. First of all we have a blacksmith interface and some implementations for it
-```
+```java
public interface Blacksmith {
Weapon manufactureWeapon(WeaponType weaponType);
}
@@ -55,7 +55,7 @@ public class OrcBlacksmith implements Blacksmith {
Now as the customers come the correct type of blacksmith is summoned and requested weapons are manufactured
-```
+```java
Blacksmith blacksmith = new ElfBlacksmith();
blacksmith.manufactureWeapon(WeaponType.SPEAR);
blacksmith.manufactureWeapon(WeaponType.AXE);
diff --git a/factory-method/pom.xml b/factory-method/pom.xml
index 4cad86fdd..124b1a73c 100644
--- a/factory-method/pom.xml
+++ b/factory-method/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
factory-method
diff --git a/feature-toggle/pom.xml b/feature-toggle/pom.xml
index 665847e5e..3c6c7af94 100644
--- a/feature-toggle/pom.xml
+++ b/feature-toggle/pom.xml
@@ -30,7 +30,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
index 97c184fec..351936b2c 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
@@ -67,7 +67,7 @@ public class App {
* @see UserGroup
* @see Service
* @see PropertiesFeatureToggleVersion
- * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion;
+ * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion
*/
public static void main(String[] args) {
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
index 9650b9f67..284ccf2ab 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
@@ -47,7 +47,7 @@ public interface Service {
/**
* Returns if the welcome message to be displayed will be the enhanced version.
*
- * @return Boolean {@value true} if enhanced.
+ * @return Boolean {@code true} if enhanced.
*/
boolean isEnhanced();
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
index a474423db..1ded334ec 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
@@ -91,7 +91,7 @@ public class PropertiesFeatureToggleVersion implements Service {
* see the value of the boolean that was set in the constructor
* {@link PropertiesFeatureToggleVersion#PropertiesFeatureToggleVersion(Properties)}
*
- * @return Boolean value {@value true} if enhanced.
+ * @return Boolean value {@code true} if enhanced.
*/
@Override
public boolean isEnhanced() {
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
index 42b7412c0..887c9f663 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
@@ -65,7 +65,7 @@ public class TieredFeatureToggleVersion implements Service {
* is driven by the user group. This method is a little redundant. However can be used to show that there is an
* enhanced version available.
*
- * @return Boolean value {@value true} if enhanced.
+ * @return Boolean value {@code true} if enhanced.
*/
@Override
public boolean isEnhanced() {
diff --git a/fluentinterface/pom.xml b/fluentinterface/pom.xml
index 234504396..a91832786 100644
--- a/fluentinterface/pom.xml
+++ b/fluentinterface/pom.xml
@@ -29,7 +29,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/flux/pom.xml b/flux/pom.xml
index 6b9b968c8..59d105b39 100644
--- a/flux/pom.xml
+++ b/flux/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
flux
diff --git a/flyweight/README.md b/flyweight/README.md
index d65995755..e008fc346 100644
--- a/flyweight/README.md
+++ b/flyweight/README.md
@@ -32,7 +32,7 @@ Wikipedia says
Translating our alchemist shop example from above. First of all we have different potion types
-```
+```java
public interface Potion {
void drink();
}
@@ -64,7 +64,7 @@ public class InvisibilityPotion implements Potion {
Then the actual Flyweight object which is the factory for creating potions
-```
+```java
public class PotionFactory {
private final Map potions;
@@ -100,7 +100,7 @@ public class PotionFactory {
And it can be used as below
-```
+```java
PotionFactory factory = new PotionFactory();
factory.createPotion(PotionType.INVISIBILITY).drink(); // You become invisible. (Potion=6566818)
factory.createPotion(PotionType.HEALING).drink(); // You feel healed. (Potion=648129364)
diff --git a/flyweight/pom.xml b/flyweight/pom.xml
index 58bbd95a8..adf675b57 100644
--- a/flyweight/pom.xml
+++ b/flyweight/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
flyweight
diff --git a/front-controller/pom.xml b/front-controller/pom.xml
index 966e5becc..b76852e02 100644
--- a/front-controller/pom.xml
+++ b/front-controller/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
front-controller
diff --git a/guarded-suspension/pom.xml b/guarded-suspension/pom.xml
index 5ac0a6e32..6b8b977eb 100644
--- a/guarded-suspension/pom.xml
+++ b/guarded-suspension/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
jar
guarded-suspension
diff --git a/guarded-suspension/src/main/java/com/iluwatar/guarded/suspension/GuardedQueue.java b/guarded-suspension/src/main/java/com/iluwatar/guarded/suspension/GuardedQueue.java
index bf6142dd9..e75fc6c49 100644
--- a/guarded-suspension/src/main/java/com/iluwatar/guarded/suspension/GuardedQueue.java
+++ b/guarded-suspension/src/main/java/com/iluwatar/guarded/suspension/GuardedQueue.java
@@ -32,7 +32,7 @@ import java.util.Queue;
* Guarded Queue is an implementation for Guarded Suspension Pattern
* Guarded suspension pattern is used to handle a situation when you want to execute a method
* on an object which is not in a proper state.
- * @see http://java-design-patterns.com/patterns/guarded-suspension/
+ * @see http://java-design-patterns.com/patterns/guarded-suspension/
*/
public class GuardedQueue {
private static final Logger LOGGER = LoggerFactory.getLogger(GuardedQueue.class);
diff --git a/half-sync-half-async/pom.xml b/half-sync-half-async/pom.xml
index 3ed2da411..e6df33018 100644
--- a/half-sync-half-async/pom.xml
+++ b/half-sync-half-async/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
half-sync-half-async
diff --git a/half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync/App.java b/half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync/App.java
index bf35416ca..90cb5ecbf 100644
--- a/half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync/App.java
+++ b/half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync/App.java
@@ -33,31 +33,31 @@ import java.util.concurrent.LinkedBlockingQueue;
* {@link AsyncTask} and {@link AsynchronousService}.
*
*
- * PROBLEM
+ * PROBLEM
* A concurrent system have a mixture of short duration, mid duration and long duration tasks. Mid
* or long duration tasks should be performed asynchronously to meet quality of service
* requirements.
*
*
- * INTENT
+ * INTENT
* The intent of this pattern is to separate the the synchronous and asynchronous processing in the
* concurrent application by introducing two intercommunicating layers - one for sync and one for
* async. This simplifies the programming without unduly affecting the performance.
*
*
- * APPLICABILITY
+ * APPLICABILITY
* UNIX network subsystems - In operating systems network operations are carried out
- * asynchronously with help of hardware level interrupts.
+ * asynchronously with help of hardware level interrupts.
* CORBA - At the asynchronous layer one thread is associated with each socket that is connected
* to the client. Thread blocks waiting for CORBA requests from the client. On receiving request it
* is inserted in the queuing layer which is then picked up by synchronous layer which processes the
- * request and sends response back to the client.
+ * request and sends response back to the client.
* Android AsyncTask framework - Framework provides a way to execute long running blocking
* calls, such as downloading a file, in background threads so that the UI thread remains free to
- * respond to user inputs.
+ * respond to user inputs.
*
*
- * IMPLEMENTATION
+ * IMPLEMENTATION
* The main method creates an asynchronous service which does not block the main thread while the
* task is being performed. The main thread continues its work which is similar to Async Method
* Invocation pattern. The difference between them is that there is a queuing layer between
diff --git a/hexagonal/pom.xml b/hexagonal/pom.xml
index 6907ca10c..e6084ac70 100644
--- a/hexagonal/pom.xml
+++ b/hexagonal/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
hexagonal
diff --git a/hexagonal/src/main/java/com/iluwatar/hexagonal/App.java b/hexagonal/src/main/java/com/iluwatar/hexagonal/App.java
index 651498607..6e226a1e1 100644
--- a/hexagonal/src/main/java/com/iluwatar/hexagonal/App.java
+++ b/hexagonal/src/main/java/com/iluwatar/hexagonal/App.java
@@ -50,13 +50,13 @@ import com.iluwatar.hexagonal.sampledata.SampleData;
* from the services it uses.
*
* The primary ports for the application are console interfaces
- * {@link ConsoleAdministration} through which the lottery round is
- * initiated and run and {@link ConsoleLottery} that allows players to
+ * {@link com.iluwatar.hexagonal.administration.ConsoleAdministration} through which the lottery round is
+ * initiated and run and {@link com.iluwatar.hexagonal.service.ConsoleLottery} that allows players to
* submit lottery tickets for the draw.
*
- * The secondary ports that application core uses are {@link WireTransfers}
- * which is a banking service, {@link LotteryEventLog} that delivers
- * eventlog as lottery events occur and {@link LotteryTicketRepository}
+ * The secondary ports that application core uses are {@link com.iluwatar.hexagonal.banking.WireTransfers}
+ * which is a banking service, {@link com.iluwatar.hexagonal.eventlog.LotteryEventLog} that delivers
+ * eventlog as lottery events occur and {@link com.iluwatar.hexagonal.database.LotteryTicketRepository}
* that is the storage for the lottery tickets.
*
*/
diff --git a/intercepting-filter/pom.xml b/intercepting-filter/pom.xml
index dc4d6a923..658dba671 100644
--- a/intercepting-filter/pom.xml
+++ b/intercepting-filter/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
intercepting-filter
diff --git a/interpreter/pom.xml b/interpreter/pom.xml
index 99e399159..1e61dfb48 100644
--- a/interpreter/pom.xml
+++ b/interpreter/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
interpreter
diff --git a/iterator/pom.xml b/iterator/pom.xml
index 2afca644c..6581b8224 100644
--- a/iterator/pom.xml
+++ b/iterator/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
iterator
diff --git a/layers/pom.xml b/layers/pom.xml
index 772c53a30..9ca1c58e7 100644
--- a/layers/pom.xml
+++ b/layers/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
com.iluwatar.layers
layers
diff --git a/lazy-loading/pom.xml b/lazy-loading/pom.xml
index 8d799d07c..6664ddcc7 100644
--- a/lazy-loading/pom.xml
+++ b/lazy-loading/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
lazy-loading
diff --git a/marker/pom.xml b/marker/pom.xml
index 708072d8c..138ab0c30 100644
--- a/marker/pom.xml
+++ b/marker/pom.xml
@@ -24,7 +24,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/mediator/pom.xml b/mediator/pom.xml
index c9369b1a9..77c29adda 100644
--- a/mediator/pom.xml
+++ b/mediator/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
mediator
diff --git a/mediator/src/test/java/com/iluwatar/mediator/PartyMemberTest.java b/mediator/src/test/java/com/iluwatar/mediator/PartyMemberTest.java
index 61f926c31..03db825e9 100644
--- a/mediator/src/test/java/com/iluwatar/mediator/PartyMemberTest.java
+++ b/mediator/src/test/java/com/iluwatar/mediator/PartyMemberTest.java
@@ -110,7 +110,7 @@ public class PartyMemberTest {
}
/**
- * Verify if {@link PartyMember#toString()} generate the expected output
+ * Verify if {@link PartyMemberBase#toString()} generate the expected output
*/
@ParameterizedTest
@MethodSource("dataProvider")
diff --git a/memento/pom.xml b/memento/pom.xml
index 2ad5321ba..ad4a55236 100644
--- a/memento/pom.xml
+++ b/memento/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
memento
diff --git a/model-view-controller/pom.xml b/model-view-controller/pom.xml
index f873107fa..89f7bd825 100644
--- a/model-view-controller/pom.xml
+++ b/model-view-controller/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
model-view-controller
diff --git a/model-view-presenter/pom.xml b/model-view-presenter/pom.xml
index 60a379996..d4db8a633 100644
--- a/model-view-presenter/pom.xml
+++ b/model-view-presenter/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
model-view-presenter
model-view-presenter
diff --git a/module/pom.xml b/module/pom.xml
index dde967bc6..1b1ecb6af 100644
--- a/module/pom.xml
+++ b/module/pom.xml
@@ -28,7 +28,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
module
diff --git a/monad/pom.xml b/monad/pom.xml
index 316c4ff9b..947259602 100644
--- a/monad/pom.xml
+++ b/monad/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
monad
diff --git a/monad/src/main/java/com/iluwatar/monad/App.java b/monad/src/main/java/com/iluwatar/monad/App.java
index 9b1ed5096..29dd1d31f 100644
--- a/monad/src/main/java/com/iluwatar/monad/App.java
+++ b/monad/src/main/java/com/iluwatar/monad/App.java
@@ -50,7 +50,7 @@ public class App {
/**
* Program entry point.
*
- * @param args @param args command line args
+ * @param args command line args
*/
public static void main(String[] args) {
User user = new User("user", 24, Sex.FEMALE, "foobar.com");
diff --git a/monostate/pom.xml b/monostate/pom.xml
index 5aa68e75b..94935cbf0 100644
--- a/monostate/pom.xml
+++ b/monostate/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
monostate
diff --git a/multiton/pom.xml b/multiton/pom.xml
index 4ee128a1d..cc5103e74 100644
--- a/multiton/pom.xml
+++ b/multiton/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
multiton
diff --git a/multiton/src/main/java/com/iluwatar/multiton/App.java b/multiton/src/main/java/com/iluwatar/multiton/App.java
index 28b89e6ab..18821af66 100644
--- a/multiton/src/main/java/com/iluwatar/multiton/App.java
+++ b/multiton/src/main/java/com/iluwatar/multiton/App.java
@@ -31,9 +31,12 @@ import org.slf4j.LoggerFactory;
* pattern defines many globally accessible objects. The client asks for the correct instance from
* the Multiton by passing an enumeration as parameter.
*
- * In this example {@link Nazgul} is the Multiton and we can ask single {@link Nazgul} from it using
- * {@link NazgulName}. The {@link Nazgul}s are statically initialized and stored in concurrent hash
- * map.
+ * There is more than one way to implement the multiton design pattern. In the first example
+ * {@link Nazgul} is the Multiton and we can ask single {@link Nazgul} from it using {@link NazgulName}.
+ * The {@link Nazgul}s are statically initialized and stored in concurrent hash map.
+ *
+ * In the enum implementation {@link NazgulEnum} is the multiton. It is static and mutable because
+ * of the way java supports enums.
*
*/
public class App {
@@ -46,6 +49,7 @@ public class App {
* @param args command line args
*/
public static void main(String[] args) {
+ // eagerly initialized multiton
LOGGER.info("KHAMUL={}", Nazgul.getInstance(NazgulName.KHAMUL));
LOGGER.info("MURAZOR={}", Nazgul.getInstance(NazgulName.MURAZOR));
LOGGER.info("DWAR={}", Nazgul.getInstance(NazgulName.DWAR));
@@ -55,5 +59,16 @@ public class App {
LOGGER.info("ADUNAPHEL={}", Nazgul.getInstance(NazgulName.ADUNAPHEL));
LOGGER.info("REN={}", Nazgul.getInstance(NazgulName.REN));
LOGGER.info("UVATHA={}", Nazgul.getInstance(NazgulName.UVATHA));
+
+ // enum multiton
+ LOGGER.info("KHAMUL={}", NazgulEnum.KHAMUL);
+ LOGGER.info("MURAZOR={}", NazgulEnum.MURAZOR);
+ LOGGER.info("DWAR={}", NazgulEnum.DWAR);
+ LOGGER.info("JI_INDUR={}", NazgulEnum.JI_INDUR);
+ LOGGER.info("AKHORAHIL={}", NazgulEnum.AKHORAHIL);
+ LOGGER.info("HOARMURATH={}", NazgulEnum.HOARMURATH);
+ LOGGER.info("ADUNAPHEL={}", NazgulEnum.ADUNAPHEL);
+ LOGGER.info("REN={}", NazgulEnum.REN);
+ LOGGER.info("UVATHA={}", NazgulEnum.UVATHA);
}
}
diff --git a/multiton/src/main/java/com/iluwatar/multiton/NazgulEnum.java b/multiton/src/main/java/com/iluwatar/multiton/NazgulEnum.java
new file mode 100644
index 000000000..375176c4f
--- /dev/null
+++ b/multiton/src/main/java/com/iluwatar/multiton/NazgulEnum.java
@@ -0,0 +1,33 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.multiton;
+
+/**
+ * enum based multiton implementation
+ *
+ */
+public enum NazgulEnum {
+
+ KHAMUL, MURAZOR, DWAR, JI_INDUR, AKHORAHIL, HOARMURATH, ADUNAPHEL, REN, UVATHA;
+
+}
diff --git a/multiton/src/test/java/com/iluwatar/multiton/NazgulEnumTest.java b/multiton/src/test/java/com/iluwatar/multiton/NazgulEnumTest.java
new file mode 100644
index 000000000..b718b9c68
--- /dev/null
+++ b/multiton/src/test/java/com/iluwatar/multiton/NazgulEnumTest.java
@@ -0,0 +1,50 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.multiton;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * @author anthony
+ *
+ */
+class NazgulEnumTest {
+
+ /**
+ * Check that multiple calls to any one of the instances in the multiton returns
+ * only that one particular instance, and do that for all instances in multiton
+ */
+ @Test
+ public void testTheSameObjectIsReturnedWithMultipleCalls() {
+ for (int i = 0; i < NazgulEnum.values().length; i++) {
+ NazgulEnum instance1 = NazgulEnum.values()[i];
+ NazgulEnum instance2 = NazgulEnum.values()[i];
+ NazgulEnum instance3 = NazgulEnum.values()[i];
+ assertSame(instance1, instance2);
+ assertSame(instance1, instance3);
+ assertSame(instance2, instance3);
+ }
+ }
+}
diff --git a/mute-idiom/pom.xml b/mute-idiom/pom.xml
index 905909384..ec2935e3c 100644
--- a/mute-idiom/pom.xml
+++ b/mute-idiom/pom.xml
@@ -21,7 +21,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
mute-idiom
diff --git a/mutex/pom.xml b/mutex/pom.xml
index 5c65d6305..84a8f58b6 100644
--- a/mutex/pom.xml
+++ b/mutex/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
mutex
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index 3efcecdca..9be69d7b2 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
naked-objects-dom
diff --git a/naked-objects/fixture/pom.xml b/naked-objects/fixture/pom.xml
index bf3cc4de8..ff15d19d8 100644
--- a/naked-objects/fixture/pom.xml
+++ b/naked-objects/fixture/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
naked-objects-fixture
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index 8d2cf3b55..20cb9868d 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
naked-objects-integtests
diff --git a/naked-objects/pom.xml b/naked-objects/pom.xml
index 222a9d321..1672bd579 100644
--- a/naked-objects/pom.xml
+++ b/naked-objects/pom.xml
@@ -15,7 +15,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
naked-objects
@@ -350,17 +350,17 @@
${project.groupId}
naked-objects-dom
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
${project.groupId}
naked-objects-fixture
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
${project.groupId}
naked-objects-webapp
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
diff --git a/naked-objects/webapp/pom.xml b/naked-objects/webapp/pom.xml
index 0f9d33bc4..6bc7184b9 100644
--- a/naked-objects/webapp/pom.xml
+++ b/naked-objects/webapp/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
naked-objects-webapp
diff --git a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
index 89d316d20..459e4b7de 100644
--- a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
+++ b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
@@ -51,14 +51,14 @@ import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvid
* See:
*
*
- * <filter>
- * <filter-name>wicket</filter-name>
- * <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- * <init-param>
- * <param-name>applicationClassName</param-name>
- * <param-value>webapp.SimpleApplication</param-value>
- * </init-param>
- * </filter>
+ * <filter>
+ * <filter-name>wicket</filter-name>
+ * <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ * <init-param>
+ * <param-name>applicationClassName</param-name>
+ * <param-value>webapp.SimpleApplication</param-value>
+ * </init-param>
+ * </filter>
*
*
*/
@@ -69,7 +69,7 @@ public class SimpleApplication extends IsisWicketApplication {
/**
* uncomment for a (slightly hacky) way of allowing logins using query args, eg:
*
- * ?user=sven&pass=pass
+ * {@code ?user=sven&pass=pass}
*
*
* for demos only, obvious.
diff --git a/null-object/pom.xml b/null-object/pom.xml
index 92831afb0..b471b86d4 100644
--- a/null-object/pom.xml
+++ b/null-object/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
null-object
diff --git a/object-mother/pom.xml b/object-mother/pom.xml
index e58d36f7d..d59799e0c 100644
--- a/object-mother/pom.xml
+++ b/object-mother/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
object-mother
diff --git a/object-pool/pom.xml b/object-pool/pom.xml
index 5e59bbfd9..75fa63163 100644
--- a/object-pool/pom.xml
+++ b/object-pool/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
object-pool
diff --git a/observer/pom.xml b/observer/pom.xml
index 20e4aa659..3843c60c8 100644
--- a/observer/pom.xml
+++ b/observer/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
observer
diff --git a/observer/src/main/java/com/iluwatar/observer/generic/Observable.java b/observer/src/main/java/com/iluwatar/observer/generic/Observable.java
index ff204437d..6c14eabec 100644
--- a/observer/src/main/java/com/iluwatar/observer/generic/Observable.java
+++ b/observer/src/main/java/com/iluwatar/observer/generic/Observable.java
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/**
- * Generic observer inspired by Java Generics and Collection by Naftalin & Wadler
+ * Generic observer inspired by Java Generics and Collection by {@literal Naftalin & Wadler}
*
* @param Subject
* @param Observer
diff --git a/page-object/pom.xml b/page-object/pom.xml
index a54998d70..f14050849 100644
--- a/page-object/pom.xml
+++ b/page-object/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
page-object
diff --git a/partial-response/pom.xml b/partial-response/pom.xml
index db0a922ee..afe04012b 100644
--- a/partial-response/pom.xml
+++ b/partial-response/pom.xml
@@ -29,7 +29,7 @@
java-design-patterns
com.iluwatar
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
4.0.0
diff --git a/poison-pill/pom.xml b/poison-pill/pom.xml
index 5b9d48126..2ae5c7b31 100644
--- a/poison-pill/pom.xml
+++ b/poison-pill/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
poison-pill
diff --git a/pom.xml b/pom.xml
index 59572ce44..e1d025c13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
4.0.0
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
pom
2014
@@ -48,6 +48,11 @@
3.3.0
1.7.21
1.1.7
+ 1.1.0
+ 1.11.289
+ 1.0.0
+ 2.0.1
+ 2.8.5
abstract-factory
@@ -112,11 +117,11 @@
business-delegate
half-sync-half-async
layers
- message-channel
+ eip-message-channel
fluentinterface
reactor
caching
- publish-subscribe
+ eip-publish-subscribe
delegation
event-driven-architecture
api-gateway
@@ -153,8 +158,9 @@
eip-splitter
eip-aggregator
retry
- dirty-flag
- trampoline
+ dirty-flag
+ trampoline
+ serverless
@@ -470,4 +476,4 @@
-
\ No newline at end of file
+
diff --git a/private-class-data/pom.xml b/private-class-data/pom.xml
index ddf9cef28..570b01935 100644
--- a/private-class-data/pom.xml
+++ b/private-class-data/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
private-class-data
diff --git a/producer-consumer/pom.xml b/producer-consumer/pom.xml
index ea9734518..9ef208f99 100644
--- a/producer-consumer/pom.xml
+++ b/producer-consumer/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
producer-consumer
diff --git a/promise/pom.xml b/promise/pom.xml
index 9b600d5fb..4ae5566b2 100644
--- a/promise/pom.xml
+++ b/promise/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
promise
diff --git a/property/pom.xml b/property/pom.xml
index b3bc915e9..d07153e32 100644
--- a/property/pom.xml
+++ b/property/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
property
diff --git a/prototype/README.md b/prototype/README.md
index 4bfeebe19..483a5e469 100644
--- a/prototype/README.md
+++ b/prototype/README.md
@@ -33,7 +33,7 @@ In short, it allows you to create a copy of an existing object and modify it to
In Java, it can be easily done by implementing `Cloneable` and overriding `clone` from `Object`
-```
+```java
class Sheep implements Cloneable {
private String name;
public Sheep(String name) { this.name = name; }
@@ -48,7 +48,7 @@ class Sheep implements Cloneable {
Then it can be cloned like below
-```
+```java
Sheep original = new Sheep("Jolly");
System.out.println(original.getName()); // Jolly
diff --git a/prototype/pom.xml b/prototype/pom.xml
index 54c9ac987..9674eabb0 100644
--- a/prototype/pom.xml
+++ b/prototype/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
prototype
diff --git a/proxy/README.md b/proxy/README.md
index 80593c75e..e0628344a 100644
--- a/proxy/README.md
+++ b/proxy/README.md
@@ -34,7 +34,7 @@ Wikipedia says
Taking our wizard tower example from above. Firstly we have the wizard tower interface and the ivory tower class
-```
+```java
public interface WizardTower {
void enter(Wizard wizard);
@@ -53,7 +53,7 @@ public class IvoryTower implements WizardTower {
Then a simple wizard class
-```
+```java
public class Wizard {
private final String name;
@@ -71,7 +71,7 @@ public class Wizard {
Then we have the proxy to add access control to wizard tower
-```
+```java
public class WizardTowerProxy implements WizardTower {
private static final Logger LOGGER = LoggerFactory.getLogger(WizardTowerProxy.class);
@@ -100,7 +100,7 @@ public class WizardTowerProxy implements WizardTower {
And here is tower entering scenario
-```
+```java
WizardTowerProxy proxy = new WizardTowerProxy(new IvoryTower());
proxy.enter(new Wizard("Red wizard")); // Red wizard enters the tower.
proxy.enter(new Wizard("White wizard")); // White wizard enters the tower.
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 31e87c04b..600285dd1 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
proxy
diff --git a/queue-load-leveling/pom.xml b/queue-load-leveling/pom.xml
index 681409e96..11d178dca 100644
--- a/queue-load-leveling/pom.xml
+++ b/queue-load-leveling/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
queue-load-leveling
diff --git a/reactor/pom.xml b/reactor/pom.xml
index e8a145f7b..f05edc244 100644
--- a/reactor/pom.xml
+++ b/reactor/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
reactor
diff --git a/reactor/src/main/java/com/iluwatar/reactor/app/App.java b/reactor/src/main/java/com/iluwatar/reactor/app/App.java
index 5208dea02..03b4a747f 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/app/App.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/app/App.java
@@ -39,13 +39,13 @@ import com.iluwatar.reactor.framework.ThreadPoolDispatcher;
* Service where it listens on multiple TCP or UDP sockets for incoming log requests.
*
*
- * INTENT
+ * INTENT
* The Reactor design pattern handles service requests that are delivered concurrently to an
* application by one or more clients. The application can register specific handlers for processing
* which are called by reactor on specific events.
*
*
- * PROBLEM
+ * PROBLEM
* Server applications in a distributed system must handle multiple clients that send them service
* requests. Following forces need to be resolved:
*
@@ -56,31 +56,37 @@ import com.iluwatar.reactor.framework.ThreadPoolDispatcher;
*
*
*
- * PARTICIPANTS
+ * PARTICIPANTS
*
- * - Synchronous Event De-multiplexer
{@link NioReactor} plays the role of synchronous event
- * de-multiplexer. It waits for events on multiple channels registered to it in an event loop.
- *
+ * - Synchronous Event De-multiplexer
*
- *
- Initiation Dispatcher
{@link NioReactor} plays this role as the application specific
- * {@link ChannelHandler}s are registered to the reactor.
- *
+ * {@link NioReactor} plays the role of synchronous event de-multiplexer.
+ * It waits for events on multiple channels registered to it in an event loop.
+ *
+ *
+ * Initiation Dispatcher
*
- *
Handle {@link AbstractNioChannel} acts as a handle that is registered to the reactor.
+ * {@link NioReactor} plays this role as the application specific {@link ChannelHandler}s
+ * are registered to the reactor.
+ *
+ *
+ * Handle
+ *
+ * {@link AbstractNioChannel} acts as a handle that is registered to the reactor.
* When any events occur on a handle, reactor calls the appropriate handler.
- *
+ *
+ *
+ * Event Handler
*
- *
Event Handler {@link ChannelHandler} acts as an event handler, which is bound to a
+ * {@link ChannelHandler} acts as an event handler, which is bound to a
* channel and is called back when any event occurs on any of its associated handles. Application
* logic resides in event handlers.
+ *
+ *
*
- *
- *
* The application utilizes single thread to listen for requests on all ports. It does not create a
* separate thread for each client, which provides better scalability under load (number of clients
* increase).
- *
- *
* The example uses Java NIO framework to implement the Reactor.
*
*/
diff --git a/reactor/src/main/java/com/iluwatar/reactor/app/AppClient.java b/reactor/src/main/java/com/iluwatar/reactor/app/AppClient.java
index 446628769..1ffa9325b 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/app/AppClient.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/app/AppClient.java
@@ -108,7 +108,7 @@ public class AppClient {
* Creates a new TCP logging client.
*
* @param clientName the name of the client to be sent in logging requests.
- * @param port the port on which client will send logging requests.
+ * @param serverPort the port on which client will send logging requests.
*/
public TcpLoggingClient(String clientName, int serverPort) {
this.clientName = clientName;
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/AbstractNioChannel.java b/reactor/src/main/java/com/iluwatar/reactor/framework/AbstractNioChannel.java
index aa7d703ce..5cfab9a95 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/AbstractNioChannel.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/AbstractNioChannel.java
@@ -141,7 +141,7 @@ public abstract class AbstractNioChannel {
* when this method returns. It will be written when the channel is flushed.
*
*
- * This method is used by the {@link ChannelHandler} to send reply back to the client.
+ * This method is used by the {@link ChannelHandler} to send reply back to the client.
* Example:
*
*
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/Dispatcher.java b/reactor/src/main/java/com/iluwatar/reactor/framework/Dispatcher.java
index a3fe187a3..1cb50a197 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/Dispatcher.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/Dispatcher.java
@@ -28,7 +28,7 @@ import java.nio.channels.SelectionKey;
* Represents the event dispatching strategy. When {@link NioReactor} senses any event on the
* registered {@link AbstractNioChannel}s then it de-multiplexes the event type, read or write or
* connect, and then calls the {@link Dispatcher} to dispatch the read events. This decouples the
- * I/O processing from application specific processing.
+ * I/O processing from application specific processing.
* Dispatcher should call the {@link ChannelHandler} associated with the channel on which event
* occurred.
*
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java b/reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java
index a315389a3..7fcffa0ac 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java
@@ -84,11 +84,8 @@ public class NioReactor {
/**
* Starts the reactor event loop in a new thread.
- *
- * @throws IOException
- * if any I/O error occurs.
*/
- public void start() throws IOException {
+ public void start() {
reactorMain.execute(() -> {
try {
LOGGER.info("Reactor started, waiting for events...");
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/NioServerSocketChannel.java b/reactor/src/main/java/com/iluwatar/reactor/framework/NioServerSocketChannel.java
index 4721d292a..1d91c4eb7 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/NioServerSocketChannel.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/NioServerSocketChannel.java
@@ -98,9 +98,9 @@ public class NioServerSocketChannel extends AbstractNioChannel {
*/
@Override
public void bind() throws IOException {
- ((ServerSocketChannel) getJavaChannel()).socket().bind(
+ getJavaChannel().socket().bind(
new InetSocketAddress(InetAddress.getLocalHost(), port));
- ((ServerSocketChannel) getJavaChannel()).configureBlocking(false);
+ getJavaChannel().configureBlocking(false);
LOGGER.info("Bound TCP socket at port: {}", port);
}
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/SameThreadDispatcher.java b/reactor/src/main/java/com/iluwatar/reactor/framework/SameThreadDispatcher.java
index 3db4f1e9a..41dd0f684 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/SameThreadDispatcher.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/SameThreadDispatcher.java
@@ -37,7 +37,7 @@ import java.nio.channels.SelectionKey;
public class SameThreadDispatcher implements Dispatcher {
/**
- * Dispatches the read event in the context of caller thread.
+ * Dispatches the read event in the context of caller thread.
* Note this is a blocking call. It returns only after the associated handler has handled the read
* event.
*/
diff --git a/reactor/src/main/java/com/iluwatar/reactor/framework/ThreadPoolDispatcher.java b/reactor/src/main/java/com/iluwatar/reactor/framework/ThreadPoolDispatcher.java
index a43a974c9..82fca0206 100644
--- a/reactor/src/main/java/com/iluwatar/reactor/framework/ThreadPoolDispatcher.java
+++ b/reactor/src/main/java/com/iluwatar/reactor/framework/ThreadPoolDispatcher.java
@@ -47,7 +47,7 @@ public class ThreadPoolDispatcher implements Dispatcher {
/**
* Submits the work of dispatching the read event to worker pool, where it gets picked up by
- * worker threads.
+ * worker threads.
* Note that this is a non-blocking call and returns immediately. It is not guaranteed that the
* event has been handled by associated handler.
*/
diff --git a/reader-writer-lock/pom.xml b/reader-writer-lock/pom.xml
index b0dc137e4..4114c88d3 100644
--- a/reader-writer-lock/pom.xml
+++ b/reader-writer-lock/pom.xml
@@ -30,7 +30,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
reader-writer-lock
diff --git a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
index b377b2273..f0f5a0090 100644
--- a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
+++ b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
@@ -50,9 +50,9 @@ public class ReaderWriterLock implements ReadWriteLock {
/**
* Global mutex is used to indicate that whether reader or writer gets the lock in the moment.
*
- * 1. When it contains the reference of {@link readerLock}, it means that the lock is acquired by the reader, another
+ * 1. When it contains the reference of {@link #readerLock}, it means that the lock is acquired by the reader, another
* reader can also do the read operation concurrently.
- * 2. When it contains the reference of reference of {@link writerLock}, it means that the lock is acquired by the
+ * 2. When it contains the reference of reference of {@link #writerLock}, it means that the lock is acquired by the
* writer exclusively, no more reader or writer can get the lock.
*
* This is the most important field in this class to control the access for reader/writer.
diff --git a/repository/pom.xml b/repository/pom.xml
index cf08ba4a5..02761f524 100644
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
repository
diff --git a/resource-acquisition-is-initialization/pom.xml b/resource-acquisition-is-initialization/pom.xml
index 3d68966c5..c69db9500 100644
--- a/resource-acquisition-is-initialization/pom.xml
+++ b/resource-acquisition-is-initialization/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
resource-acquisition-is-initialization
diff --git a/resource-acquisition-is-initialization/src/main/java/com/iluwatar/resource/acquisition/is/initialization/App.java b/resource-acquisition-is-initialization/src/main/java/com/iluwatar/resource/acquisition/is/initialization/App.java
index 75d5dff27..9817fea44 100644
--- a/resource-acquisition-is-initialization/src/main/java/com/iluwatar/resource/acquisition/is/initialization/App.java
+++ b/resource-acquisition-is-initialization/src/main/java/com/iluwatar/resource/acquisition/is/initialization/App.java
@@ -33,13 +33,13 @@ import org.slf4j.LoggerFactory;
* In RAII resource is tied to object lifetime: resource allocation is done during object creation
* while resource deallocation is done during object destruction.
*
- * In Java RAII is achieved with try-with-resources statement and interfaces {@link Closeable} and
+ * In Java RAII is achieved with try-with-resources statement and interfaces {@link java.io.Closeable} and
* {@link AutoCloseable}. The try-with-resources statement ensures that each resource is closed at
* the end of the statement. Any object that implements {@link java.lang.AutoCloseable}, which
* includes all objects which implement {@link java.io.Closeable}, can be used as a resource.
*
* In this example, {@link SlidingDoor} implements {@link AutoCloseable} and {@link TreasureChest}
- * implements {@link Closeable}. Running the example, we can observe that both resources are
+ * implements {@link java.io.Closeable}. Running the example, we can observe that both resources are
* automatically closed.
*
* http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html
diff --git a/retry/pom.xml b/retry/pom.xml
index 9fb98d42a..9999e0c3b 100644
--- a/retry/pom.xml
+++ b/retry/pom.xml
@@ -26,7 +26,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
retry
jar
diff --git a/semaphore/pom.xml b/semaphore/pom.xml
index 6337951a4..fc4a6e362 100644
--- a/semaphore/pom.xml
+++ b/semaphore/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
semaphore
diff --git a/servant/pom.xml b/servant/pom.xml
index 220e197f1..d72fde86f 100644
--- a/servant/pom.xml
+++ b/servant/pom.xml
@@ -29,7 +29,7 @@
com.iluwatar
java-design-patterns
- 1.19.0-SNAPSHOT
+ 1.20.0-SNAPSHOT
servant
diff --git a/serverless/README.md b/serverless/README.md
new file mode 100644
index 000000000..b0a29fe66
--- /dev/null
+++ b/serverless/README.md
@@ -0,0 +1,199 @@
+---
+layout: pattern
+title: serverless
+folder: serverless
+permalink: /patterns/serverless/
+categories: Architectural
+tags:
+ - Java
+ - Difficulty-Intermediate
+---
+
+## Serverless
+
+Serverless eliminates the need to plan for infrastructure and let's you focus on your
+application.
+
+Following are optimization katas you should be aware of while building a serverless
+applications
+
+* The Lean function
+ * Concise logic - Use functions to transform, not transport (utilize some of the
+ integration available from the provider to transport), and make sure you read only
+ what you need
+ * Efficient/single purpose code - avoid conditional/routing logic and break down
+ into individual functions, avoid "fat"/monolithic functions and control the
+ dependencies in the function deployment package to reduce the load time for your
+ function
+ * ephemeral environment - Utilize container start for expensive initializations
+* Eventful Invocations
+ * Succinct payloads - Scrutinize the event as much as possible, and watch for
+ payload constraints (async - 128K)
+ * resilient routing - Understand retry policies and leverage dead letter queues
+ (SQS or SNS for replays) and remember retries count as invocations
+ * concurrent execution - lambda thinks of it's scale in terms of concurrency and
+ its not request based/duration based. Lambda will spin up the number of instances
+ based on the request.
+* Coordinated calls
+ * Decoupled via APIs - best practice to setup your application is to have API's as
+ contracts that ensures separation of concerns
+ * scale-matched downstream - make sure when Lambda is calling downstream
+ components, you are matching scale configuration to it (by specifying max
+ concurrency based on downstream services)
+ * secured - Always ask a question, do I need a VPC?
+* Serviceful operations
+ * Automated - use automated tools to manage and maintain the stack
+ * monitored applications - use monitoring services to get holistic view of your
+ serverless applications
+
+## Intent
+
+Whether to reduce your infrastructure costs, shrink the time you spend on ops tasks,
+simplify your deployment processes, reach infinite scalability, serverless cuts time
+to market in half.
+
+## Explanation
+
+Serverless computing is a cloud computing execution model in which the cloud provider
+dynamically manages the allocation of machine resources. Pricing is based on the
+actual amount of resources consumed by an application, rather than on pre-purchased
+units of capacity.
+
+## Serverless framework
+
+[Serverless](https://serverless.com/) is a toolkit for deploying and operating serverless architectures.
+
+## (Function as a Service or "FaaS")
+
+The term ‘Serverless’ is confusing since with such applications there are both server
+hardware and server processes running somewhere, but the difference to normal
+approaches is that the organization building and supporting a ‘Serverless’ application
+ is not looking after the hardware or the processes - they are outsourcing this to a vendor.
+
+Some of the Serverless Cloud Providers are
+
+
+
+
+
+
+
+
+...
+
+Anything that triggers an Lambda Function to execute is regarded by the Framework as
+an Event. Most of the Serverless Cloud Providers support following Events
+- Http
+- PubSub Events
+- scheduled
+
+AWS supports processing event generated from AWS Services (S3/Cloudwatch/etc) and
+using aws as a compute engine is our first choice.
+
+## (Backend as a Service or "BaaS")
+This example creates a backend for ‘persons’ collection which uses DynamoDB NoSQL
+database service also provided by Amazon.
+
+## AWS lambda function implementation
+
+[AWS Lambda SDK](https://aws.amazon.com/sdk-for-java/) provides pre-defined interface
+`com.amazonaws.services.lambda.runtime
+.RequestHandler` to implement our lambda function.
+
+```java
+public class LambdaInfoApiHandler implements RequestHandler