Merged V2.2 to HEAD

10963: Merged DEV/LARGE_COLLECTION_PROPERTIES_2.2.1 to V2.2
          - PersonService: Lucene removal
          - Lucene optimizations (in progress)
          - Multi-valued and locale-specific properties persisted in alf_node_properties
          - Removal of unused AVM tables
   10987: Oracle dialects and enhanced SQL patch support
          - Only support Alfresco's 9i and 10g dialects (with auto-switching)
          - SQL script patches can now apply selectively to ranges
   11007: Test to check cached retrieval of QNames


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11206 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-10-06 13:26:18 +00:00
parent dd2ce5da0a
commit 6f302f0350
100 changed files with 8759 additions and 3628 deletions

View File

@@ -127,6 +127,7 @@ public class TransactionalCache<K extends Serializable, V extends Object>
{
return false;
}
@SuppressWarnings("unchecked")
TransactionalCache that = (TransactionalCache) obj;
return EqualsHelper.nullSafeEquals(this.name, that.name);
}
@@ -565,14 +566,22 @@ public class TransactionalCache<K extends Serializable, V extends Object>
}
/**
* Merge the transactional caches into the shared cache
* NO-OP
*/
@SuppressWarnings("unchecked")
public void beforeCommit(boolean readOnly)
{
}
/**
* Merge the transactional caches into the shared cache
*/
@SuppressWarnings("unchecked")
public void afterCommit()
{
if (isDebugEnabled)
{
logger.debug("Processing before-commit");
logger.debug("Processing after-commit");
}
TransactionData txnData = getTransactionData();
@@ -609,7 +618,7 @@ public class TransactionalCache<K extends Serializable, V extends Object>
{
Element element = txnData.updatedItemsCache.get(key);
CacheBucket<V> bucket = (CacheBucket<V>) element.getObjectValue();
sharedCache.put(key, bucket.getValue());
bucket.doPostCommit(sharedCache, key);
}
if (isDebugEnabled)
{
@@ -626,14 +635,6 @@ public class TransactionalCache<K extends Serializable, V extends Object>
}
}
/**
* NO-OP
*/
@SuppressWarnings("unchecked")
public void afterCommit()
{
}
/**
* Just allow the transactional caches to be thrown away
*/
@@ -769,15 +770,8 @@ public class TransactionalCache<K extends Serializable, V extends Object>
}
public void doPostCommit(SimpleCache<Serializable, BV> sharedCache, Serializable key)
{
if (sharedCache.contains(key))
{
// We remove the shared entry whether it has moved on or not
sharedCache.remove(key);
}
else
{
// The shared cache no longer has a value
}
// We remove the shared entry whether it has moved on or not
sharedCache.remove(key);
}
}