Author: manik.surtani(a)jboss.com
Date: 2008-07-31 11:37:28 -0400 (Thu, 31 Jul 2008)
New Revision: 6469
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationContext.java
core/trunk/src/main/java/org/jboss/cache/invocation/MVCCInvocationContext.java
core/trunk/src/main/java/org/jboss/cache/transaction/MVCCTransactionContext.java
Log:
Better tuned collections
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationContext.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationContext.java 2008-07-31
15:22:36 UTC (rev 6468)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationContext.java 2008-07-31
15:37:28 UTC (rev 6469)
@@ -131,7 +131,7 @@
else
{
// no need to worry about concurrency here - a context is only valid for a
single thread.
- if (invocationLocks == null) invocationLocks = new LinkedHashSet(5);
+ if (invocationLocks == null) invocationLocks = new LinkedHashSet(4);
invocationLocks.addAll(locks);
}
}
@@ -147,7 +147,7 @@
else
{
// no need to worry about concurrency here - a context is only valid for a
single thread.
- if (invocationLocks == null) invocationLocks = new LinkedHashSet(5);
+ if (invocationLocks == null) invocationLocks = new LinkedHashSet(4);
invocationLocks.add(lock);
}
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/MVCCInvocationContext.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/MVCCInvocationContext.java 2008-07-31
15:22:36 UTC (rev 6468)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/MVCCInvocationContext.java 2008-07-31
15:37:28 UTC (rev 6469)
@@ -16,7 +16,7 @@
*/
public class MVCCInvocationContext extends AbstractInvocationContext
{
- private final Map<Fqn, NodeSPI> lookedUpNodes = new HashMap<Fqn,
NodeSPI>();
+ private final Map<Fqn, NodeSPI> lookedUpNodes = new HashMap<Fqn,
NodeSPI>(4);
private MVCCTransactionContext mvccTCtx;
@Override
Modified:
core/trunk/src/main/java/org/jboss/cache/transaction/MVCCTransactionContext.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/transaction/MVCCTransactionContext.java 2008-07-31
15:22:36 UTC (rev 6468)
+++
core/trunk/src/main/java/org/jboss/cache/transaction/MVCCTransactionContext.java 2008-07-31
15:37:28 UTC (rev 6469)
@@ -17,7 +17,7 @@
*/
public class MVCCTransactionContext extends AbstractTransactionContext
{
- private final Map<Fqn, NodeSPI> lookedUpNodes = new HashMap<Fqn,
NodeSPI>();
+ private final Map<Fqn, NodeSPI> lookedUpNodes = new HashMap<Fqn,
NodeSPI>(8);
public MVCCTransactionContext(Transaction tx) throws SystemException,
RollbackException
{