Author: simonetripodi
Date: Thu Feb 16 20:01:39 2012
New Revision: 1245146
URL: http://svn.apache.org/viewvc?rev=1245146&view=rev
Log:
AllocationPolicy initialization method renamed to 'init()' according to general
design
Modified:
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/AllocationPolicy.java
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/MemoryManagerServiceWithAllocationPolicyImpl.java
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/RoundRobinAllocationPolicy.java
Modified:
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/AllocationPolicy.java
URL:
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/AllocationPolicy.java?rev=1245146&r1=1245145&r2=1245146&view=diff
==============================================================================
---
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/AllocationPolicy.java
(original)
+++
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/AllocationPolicy.java
Thu Feb 16 20:01:39 2012
@@ -23,7 +23,7 @@ import java.util.List;
/**
* Interface describing the buffer allocation policy.
- * The implementations will be initialized by setting the list of buffers
{@link #setBuffers(List)},
+ * The implementations will be initialized by setting the list of buffers
{@link #init(List)},
* and every allocation will call {@link #getActiveBuffer(OffHeapMemoryBuffer,
int)},
* passing the previously (possibly null) buffer that failed to allocate and
the number of the current allocation
*
@@ -38,7 +38,7 @@ public interface AllocationPolicy
*
* @param buffers
*/
- void setBuffers( List<OffHeapMemoryBuffer> buffers );
+ void init( List<OffHeapMemoryBuffer> buffers );
/**
* Returns the active buffer in which to allocate.
Modified:
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/MemoryManagerServiceWithAllocationPolicyImpl.java
URL:
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/MemoryManagerServiceWithAllocationPolicyImpl.java?rev=1245146&r1=1245145&r2=1245146&view=diff
==============================================================================
---
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/MemoryManagerServiceWithAllocationPolicyImpl.java
(original)
+++
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/MemoryManagerServiceWithAllocationPolicyImpl.java
Thu Feb 16 20:01:39 2012
@@ -35,7 +35,7 @@ public class MemoryManagerServiceWithAll
public void init( int numberOfBuffers, int size )
{
super.init( numberOfBuffers, size );
- allocationPolicy.setBuffers( getBuffers() );
+ allocationPolicy.init( getBuffers() );
}
public void setAllocationPolicy( final AllocationPolicy allocationPolicy )
Modified:
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/RoundRobinAllocationPolicy.java
URL:
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/RoundRobinAllocationPolicy.java?rev=1245146&r1=1245145&r2=1245146&view=diff
==============================================================================
---
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/RoundRobinAllocationPolicy.java
(original)
+++
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/memory/RoundRobinAllocationPolicy.java
Thu Feb 16 20:01:39 2012
@@ -56,7 +56,7 @@ public class RoundRobinAllocationPolicy
}
@Override
- public void setBuffers( List<OffHeapMemoryBuffer> buffers )
+ public void init( List<OffHeapMemoryBuffer> buffers )
{
this.buffers = buffers;
}