Removing InstancePool and remaining implementations, as they are not used.

Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/adc7befc
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/adc7befc
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/adc7befc

Branch: refs/heads/develop
Commit: adc7befce9f5b8e79d4b707811c27e8a9784e9c9
Parents: 393cf21
Author: niclas <[email protected]>
Authored: Thu May 3 08:32:33 2018 +0800
Committer: niclas <[email protected]>
Committed: Thu May 3 08:32:33 2018 +0800

----------------------------------------------------------------------
 .../runtime/composite/CompositeMethodModel.java |  2 -
 .../runtime/composite/InstancePool.java         | 30 ------------
 ...SynchronizedCompositeMethodInstancePool.java | 50 --------------------
 ...synchronizedCompositeMethodInstancePool.java | 50 --------------------
 4 files changed, 132 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/adc7befc/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
----------------------------------------------------------------------
diff --git 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
 
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
index 1ed4cdd..3981ae6 100644
--- 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
+++ 
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
@@ -56,7 +56,6 @@ public final class CompositeMethodModel
     private final AnnotatedElement annotations;
 
     // Context
-//    private final SynchronizedCompositeMethodInstancePool instancePool = new 
SynchronizedCompositeMethodInstancePool();
     private final ConcurrentLinkedQueue<CompositeMethodInstance> instancePool 
= new ConcurrentLinkedQueue<>();
     private final ConstraintsInstance constraintsInstance;
 
@@ -74,7 +73,6 @@ public final class CompositeMethodModel
         constraints = constraintsModel;
         constraintsInstance = constraints.newInstance();
         annotations = new CompositeMethodAnnotatedElement();
-//        instancePool = new SynchronizedCompositeMethodInstancePool();
     }
 
     // Model

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/adc7befc/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InstancePool.java
----------------------------------------------------------------------
diff --git 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InstancePool.java
 
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InstancePool.java
deleted file mode 100644
index 0c6f1f0..0000000
--- 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InstancePool.java
+++ /dev/null
@@ -1,30 +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 org.apache.polygene.runtime.composite;
-
-/**
- * JAVADOC
- */
-public interface InstancePool<T>
-{
-    T obtainInstance();
-
-    void releaseInstance( T instance );
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/adc7befc/core/runtime/src/main/java/org/apache/polygene/runtime/composite/SynchronizedCompositeMethodInstancePool.java
----------------------------------------------------------------------
diff --git 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/SynchronizedCompositeMethodInstancePool.java
 
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/SynchronizedCompositeMethodInstancePool.java
deleted file mode 100644
index 01025cf..0000000
--- 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/SynchronizedCompositeMethodInstancePool.java
+++ /dev/null
@@ -1,50 +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 org.apache.polygene.runtime.composite;
-
-/**
- * Method instance pool that keeps a linked list. Uses synchronization
- * to ensure that instances are acquired and returned in a thread-safe
- * manner.
- */
-public final class SynchronizedCompositeMethodInstancePool
-    implements InstancePool<CompositeMethodInstance>
-{
-    private CompositeMethodInstance first = null;
-
-    @Override
-    public synchronized CompositeMethodInstance obtainInstance()
-    {
-        CompositeMethodInstance instance = first;
-        if( instance != null )
-        {
-            first = instance.getNext();
-        }
-        return instance;
-    }
-
-    @Override
-    public synchronized void releaseInstance( CompositeMethodInstance instance 
)
-    {
-        instance.setNext( first );
-        first = instance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/adc7befc/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UnsynchronizedCompositeMethodInstancePool.java
----------------------------------------------------------------------
diff --git 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UnsynchronizedCompositeMethodInstancePool.java
 
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UnsynchronizedCompositeMethodInstancePool.java
deleted file mode 100644
index 56bfce5..0000000
--- 
a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UnsynchronizedCompositeMethodInstancePool.java
+++ /dev/null
@@ -1,50 +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 org.apache.polygene.runtime.composite;
-
-/**
- * Method instance pool that keeps a linked list. Uses synchronization
- * to ensure that instances are acquired and returned in a thread-safe
- * manner.
- */
-public final class UnsynchronizedCompositeMethodInstancePool
-    implements InstancePool<CompositeMethodInstance>
-{
-    private CompositeMethodInstance first = null;
-
-    @Override
-    public CompositeMethodInstance obtainInstance()
-    {
-        CompositeMethodInstance instance = first;
-        if( instance != null )
-        {
-            first = instance.getNext();
-        }
-        return instance;
-    }
-
-    @Override
-    public void releaseInstance( CompositeMethodInstance instance )
-    {
-        instance.setNext( first );
-        first = instance;
-    }
-}
\ No newline at end of file

Reply via email to