Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Merino García committed Nov 16, 2023
1 parent 5fe2ab9 commit bf3f6bd
Show file tree
Hide file tree
Showing 56 changed files with 584 additions and 743 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ Processes.deploy_undeploy avgt 10 2.907 ± 0.658 s/op

## <a name="requirements"><a/> Requirements

Java 11 or greater
Java 17 or greater

## <a name="installation"><a/> Installation

Expand All @@ -1122,7 +1122,7 @@ Java 11 or greater
<dependency>
<groupId>com.github.imrafaelmerino</groupId>
<artifactId>vertx-effect</artifactId>
<version>3.0.1</version>
<version>4.0.0</version>
</dependency>
```

Expand Down
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
<MAVEN-COMPILER-PLUGIN.SOURCE>17</MAVEN-COMPILER-PLUGIN.SOURCE>
<MAVEN-COMPILER-PLUGIN.TARGET>17</MAVEN-COMPILER-PLUGIN.TARGET>
<VERTX-VERSION>4.4.6</VERTX-VERSION>
<JSON-VALUES.VERSION>13.9.0</JSON-VALUES.VERSION>
<JAVA-FUN.VERSION>1.3.2</JAVA-FUN.VERSION>
<VERTX.JSON-VALUES.VERSION>0.8</VERTX.JSON-VALUES.VERSION>
<VERTX.JSON-VALUES.VERSION>1.0.0</VERTX.JSON-VALUES.VERSION>
<MAVEN-JAR-PLUGIN.VERSION>3.2.0</MAVEN-JAR-PLUGIN.VERSION>
<PROJECT.BUILD.SOURCE_ENCODING>UTF-8</PROJECT.BUILD.SOURCE_ENCODING>
<MAVEN-COMPILER-PLUGIN.VERSION>3.10.1</MAVEN-COMPILER-PLUGIN.VERSION>
Expand Down Expand Up @@ -122,11 +121,6 @@
<version>${JAVA-FUN.VERSION}</version>
</dependency>

<dependency>
<groupId>com.github.imrafaelmerino</groupId>
<artifactId>json-values</artifactId>
<version>${JSON-VALUES.VERSION}</version>
</dependency>

<dependency>
<groupId>com.github.imrafaelmerino</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/vertx/effect/AllExpPar.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

final class AllExpPar extends AllExp {

private final List<VIO<Boolean>> exps;

AllExpPar(final List<VIO<Boolean>> exps) {
this.exps = requireNonNull(exps);
}

private final List<VIO<Boolean>> exps;

@Override
public VIO<Boolean> retryEach(final RetryPolicy policy) {
return retryEach(e -> true, policy);
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/vertx/effect/AllExpSeq.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@

final class AllExpSeq extends AllExp {

private final List<VIO<Boolean>> exps;

AllExpSeq(final List<VIO<Boolean>> exps) {
this.exps = requireNonNull(exps);
}

private final List<VIO<Boolean>> exps;


@Override
public VIO<Boolean> retryEach(final RetryPolicy policy) {
return retryEach(e -> true,
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/vertx/effect/AnyExpPar.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@

final class AnyExpPar extends AnyExp {

final List<VIO<Boolean>> exps;

AnyExpPar(final List<VIO<Boolean>> exps) {
this.exps = requireNonNull(exps);
}

final List<VIO<Boolean>> exps;


@Override
public VIO<Boolean> retryEach(final RetryPolicy policy) {
return retryEach(e -> true,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/vertx/effect/AnyExpSeq.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

final class AnyExpSeq extends AnyExp {

final List<VIO<Boolean>> exps;

AnyExpSeq(final List<VIO<Boolean>> exps) {
this.exps = requireNonNull(exps);
}

final List<VIO<Boolean>> exps;

@Override
public VIO<Boolean> retryEach(final RetryPolicy policy) {
return retryEach(e -> true, policy);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/vertx/effect/BodyHttpReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import static java.util.Objects.requireNonNull;

public abstract class BodyHttpReq<T extends BodyHttpReq<T>> extends HttpReq<T> {
private final byte[] body;

public BodyHttpReq(final byte[] body) {
this.body = requireNonNull(body);
}

private final byte[] body;

@Override
public JsObj createHttpReq() {
return BYTES_BODY_LENS.set.apply(body)
Expand Down
18 changes: 7 additions & 11 deletions src/main/java/vertx/effect/Clock.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,23 @@ public interface Clock extends Supplier<Long> {


/**
* Creates a monotonic clock, appropriate for time measurements.
* When invoked, it returns the current value of the running Java
* Virtual Machine's high-resolution time source, in nanoseconds
* It uses the {@link System#nanoTime } method.
* Creates a monotonic clock, appropriate for time measurements. When invoked, it returns the current value of the
* running Java Virtual Machine's high-resolution time source, in nanoseconds It uses the {@link System#nanoTime }
* method.
*
* @see System#nanoTime
*/
Clock monotonic = System::nanoTime;

/**
* Creates a realtime or wall-clock watch. It produces the current time,
* as a Unix timestamp in milliseconds (number of time units since the Unix epoch).
* This clock is not appropriate for measuring duration of intervals
* ( use {@link Clock#monotonic} instead ).
* It uses the {@link System#currentTimeMillis } method.
* Creates a realtime or wall-clock watch. It produces the current time, as a Unix timestamp in milliseconds (number
* of time units since the Unix epoch). This clock is not appropriate for measuring duration of intervals ( use
* {@link Clock#monotonic} instead ). It uses the {@link System#currentTimeMillis } method.
*
* @see System#currentTimeMillis
*/
Clock realTime = System::currentTimeMillis;
Function<Supplier<Long>, Clock> custom = s -> s::get;

/**
* returns lambda that produces monotonic clock measurement in the specified unit
Expand Down Expand Up @@ -62,7 +60,5 @@ static Clock realTime(TimeUnit unit) {
};
}

Function<Supplier<Long>, Clock> custom = s -> s::get;


}

0 comments on commit bf3f6bd

Please sign in to comment.