You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ag...@apache.org on 2016/05/17 00:38:14 UTC

[05/50] [abbrv] incubator-geode git commit: GEODE-248: remove unused BoundedLinkedHashMap

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/a8282eb3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a8282eb3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a8282eb3

Branch: refs/heads/feature/GEODE-1209
Commit: a8282eb38fc85f41ffcf8a45ea1d130fa9e2c3de
Parents: 1db55d8
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue May 10 14:15:09 2016 -0700
Committer: Anil <ag...@pivotal.io>
Committed: Mon May 16 17:31:53 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/a8282eb3/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/a8282eb3/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