docs: update object pool

This commit is contained in:
Ilkka Seppälä
2024-05-14 17:44:17 +03:00
parent a26f4aa209
commit cf3282149b
2 changed files with 52 additions and 17 deletions
@@ -24,11 +24,12 @@
*/
package com.iluwatar.object.pool;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicInteger;import lombok.extern.slf4j.Slf4j;
/**
* Oliphaunts are expensive to create.
*/
@Slf4j
public class Oliphaunt {
private static final AtomicInteger counter = new AtomicInteger(0);
@@ -43,7 +44,7 @@ public class Oliphaunt {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
LOGGER.error("Error occurred: ", e);
}
}