geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [05/10] incubator-geode git commit: GEODE-248: remove unused BoundedLinkedHashMap
Date Wed, 11 May 2016 18:09:33 GMT
GEODE-248: remove unused BoundedLinkedHashMap


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fc943cb8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fc943cb8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fc943cb8

Branch: refs/heads/feature/GEODE-1371
Commit: fc943cb81e10f4121ce9a1e6ca6e8e0d3fbc10f9
Parents: 463ae16
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue May 10 14:15:09 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Wed May 11 10:13:12 2016 -0700

----------------------------------------------------------------------
 .../cache/util/BoundedLinkedHashMap.java        | 88 --------------------
 .../codeAnalysis/sanctionedSerializables.txt    |  1 -
 2 files changed, 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc943cb8/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
deleted file mode 100755
index fbb024a..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache.util;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Class <code>BoundedLinkedHashMap</code> is a bounded
- * <code>LinkedHashMap</code>. The bound is the maximum
- * number of entries the <code>BoundedLinkedHashMap</code>
- * can contain.
- *
- * @since 4.2
- * @deprecated as of 5.7 create your own class that extends {@link LinkedHashMap}
- * and implement {@link LinkedHashMap#removeEldestEntry}
- * to enforce a maximum number of entries.
- */
-public class BoundedLinkedHashMap extends LinkedHashMap
-{
-  private static final long serialVersionUID = -3419897166186852692L;
-
-  /**
-   * The maximum number of entries allowed in this
-   * <code>BoundedLinkedHashMap</code>
-   */
-  protected int _maximumNumberOfEntries;
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param loadFactor The load factor
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, float loadFactor, int maximumNumberOfEntries)
{
-    super(initialCapacity, loadFactor);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, int maximumNumberOfEntries) {
-    super(initialCapacity);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int maximumNumberOfEntries) {
-    super();
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Returns the maximum number of entries.
-   * @return the maximum number of entries
-   */
-  public int getMaximumNumberOfEntries(){
-    return this._maximumNumberOfEntries;
-  }
-
-  @Override
-  protected boolean removeEldestEntry(Map.Entry entry) {
-    return size() > this._maximumNumberOfEntries;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc943cb8/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
index f356bda..ed0f9fc 100755
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -202,7 +202,6 @@ com/gemstone/gemfire/cache/query/internal/parse/GemFireAST,true,7799648022743052
 com/gemstone/gemfire/cache/query/internal/utils/PDXUtils$1,false
 com/gemstone/gemfire/cache/query/internal/utils/PDXUtils$2,false
 com/gemstone/gemfire/cache/snapshot/SnapshotOptions$SnapshotFormat,false
-com/gemstone/gemfire/cache/util/BoundedLinkedHashMap,true,-3419897166186852692,_maximumNumberOfEntries:int
 com/gemstone/gemfire/cache/util/Gateway$OrderPolicy,false
 com/gemstone/gemfire/cache/wan/GatewaySender$OrderPolicy,false
 com/gemstone/gemfire/compression/CompressionException,true,4118639654597191235


Mime
View raw message