Skip to content

Commit

Permalink
- Updated the major version of Grizzly framework (2.4.4 -> 4.0.2).
Browse files Browse the repository at this point in the history
- Changed the minimum java version to 11 or higher.
- Replaced the use of NullaryFunction, which has been removed since Grizzly framework 4.0.1, with Supplier (related issue eclipse-ee4j/grizzly#2179).
- Updated the minor version of grizzly-memcached (1.3.x -> 1.4.x).
  • Loading branch information
carryel committed Sep 20, 2024
1 parent 0a6415d commit 3003c13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -28,7 +28,7 @@

<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-memcached</artifactId>
<version>1.3.20-SNAPSHOT</version>
<version>1.4.0-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>grizzly-memcached</name>
Expand Down Expand Up @@ -74,9 +74,9 @@
</issueManagement>

<properties>
<grizzly-framework-version>2.4.4</grizzly-framework-version>
<grizzly-framework-version>4.0.2</grizzly-framework-version>
<zookeeper-version>3.8.1</zookeeper-version>
<jdk.compile.version>1.8</jdk.compile.version>
<jdk.compile.version>11</jdk.compile.version>
<maven.compiler.argument>
-Xlint:unchecked,deprecation,fallthrough,finally,cast,dep-ann,empty,overrides
</maven.compiler.argument>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -27,7 +27,6 @@
import org.glassfish.grizzly.memory.Buffers;
import org.glassfish.grizzly.memory.CompositeBuffer;
import org.glassfish.grizzly.memory.MemoryManager;
import org.glassfish.grizzly.utils.NullaryFunction;

import java.io.IOException;
import java.net.SocketAddress;
Expand All @@ -36,6 +35,7 @@
import java.util.concurrent.LinkedTransferQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down Expand Up @@ -79,16 +79,18 @@ public enum ParsingStatus {
private final Attribute<ParsingStatus> statusAttribute = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute("MemcachedClientFilter.Status");
private final Attribute<MemcachedResponse> responseAttribute =
Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute("MemcachedClientFilter.Response",
new NullaryFunction<MemcachedResponse>() {
public MemcachedResponse evaluate() {
return MemcachedResponse.create();
}
});
new Supplier<MemcachedResponse>() {
@Override
public MemcachedResponse get() {
return MemcachedResponse.create();
}
});

private final Attribute<BlockingQueue<MemcachedRequest>> requestQueueAttribute =
Grizzly.DEFAULT_ATTRIBUTE_BUILDER.<BlockingQueue<MemcachedRequest>>createAttribute("MemcachedClientFilter.RequestQueue",
new NullaryFunction<BlockingQueue<MemcachedRequest>>() {
public BlockingQueue<MemcachedRequest> evaluate() {
Grizzly.DEFAULT_ATTRIBUTE_BUILDER.<BlockingQueue<MemcachedRequest>>createAttribute(
"MemcachedClientFilter.RequestQueue", new Supplier<BlockingQueue<MemcachedRequest>>() {
@Override
public BlockingQueue<MemcachedRequest> get() {
return new LinkedTransferQueue<>();
}
});
Expand Down

0 comments on commit 3003c13

Please sign in to comment.