[grizzly~memcached:852dbc70] + used only 2 bytes of header's flag

  • From: carryel@...
  • To: commits@...
  • Subject: [grizzly~memcached:852dbc70] + used only 2 bytes of header's flag
  • Date: Thu, 7 Nov 2013 10:34:16 +0000

Project:    grizzly
Repository: memcached
Revision:   852dbc708932a432da2d1450b512daba2f7b6c9f
Author:     carryel
Date:       2013-11-07 10:34:38 UTC
Link:       

Log Message:
------------
+ used only 2 bytes of header's flag
+ grizzly-framework version up(2.3.6->2.3.7)



Revisions:
----------
852dbc708932a432da2d1450b512daba2f7b6c9f


Modified Paths:
---------------
pom.xml
src/main/java/org/glassfish/grizzly/memcached/BufferWrapper.java
src/main/java/org/glassfish/grizzly/memcached/GrizzlyMemcachedCacheManager.java


Diffs:
------
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
         <url>http://grizzly.java.net</url>
     </organization>
     <properties>
-        <grizzly-framework-version>2.3.6</grizzly-framework-version>
+        <grizzly-framework-version>2.3.7</grizzly-framework-version>
         <zookeeper-version>3.3.4</zookeeper-version>
     </properties>
     <build>--- 
a/src/main/java/org/glassfish/grizzly/memcached/BufferWrapper.java
+++ b/src/main/java/org/glassfish/grizzly/memcached/BufferWrapper.java
@@ -90,12 +90,14 @@ public class BufferWrapper<T> implements Cacheable {
 
         public final int flags;
 
-        private BufferType(int flags) {
-            this.flags = flags;
+        private BufferType(final int typeFlags) {
+            this.flags = typeFlags;
         }
 
-        public static BufferType getBufferType(final int type) {
-            switch (type) {
+        public static BufferType getBufferType(final int flags) {
+            // use only 2 bytes in flags
+            final short typeFlags = (short) (flags & 0xFFFF);
+            switch (typeFlags) {
                 case 0:
                     return NONE;
                 case 1:--- 
a/src/main/java/org/glassfish/grizzly/memcached/GrizzlyMemcachedCacheManager.java
+++ 
b/src/main/java/org/glassfish/grizzly/memcached/GrizzlyMemcachedCacheManager.java
@@ -183,7 +183,7 @@ public class GrizzlyMemcachedCacheManager implements 
CacheManager {
         caches.clear();
         if (!isExternalTransport && transport != null) {
             try {
-                transport.stop();
+                transport.shutdownNow();
             } catch (IOException ie) {
                 if (logger.isLoggable(Level.INFO)) {
                     logger.log(Level.INFO, "failed to stop the transport", 
ie);





[grizzly~memcached:852dbc70] + used only 2 bytes of header's flag

carryel 11/07/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close