com.dotmarketing.cache
Class IdentifierCache

java.lang.Object
  extended by com.dotmarketing.cache.IdentifierCache

public class IdentifierCache
extends java.lang.Object

Author:
David TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
IdentifierCache()
           
 
Method Summary
static void addAssetToIdentifierCache(Inode webAsset)
           
static void addIdentifierToIdentifierCache(Identifier id)
           
static void clearCache()
           
static Identifier getIdentifierByInodeFromCache(long webAssetInode)
           
static Identifier getIdentifierByInodeFromCache(WebAsset asset)
           
static Identifier getPathFromIdCache(java.lang.String URI, Host host)
           
static Identifier getPathFromIdCache(java.lang.String URI, long hostId)
          This method find the identifier associated with the given URI this methods will try to find the identifier in memory but if it is not found in memory it'll be found in db and put in memory.
static boolean hasIdentifier(long webAssetInode)
           
static void removeAssetFromIdCache(WebAsset asset)
           
static void removeFromIdCacheByInode(long inode)
           
static void removeFromIdCacheByInode(WebAsset inode)
           
static void removeURIFromIdCache(java.lang.String URI, Host host)
           
static void removeURIFromIdCache(java.lang.String URI, long hostId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifierCache

public IdentifierCache()
Method Detail

addIdentifierToIdentifierCache

public static void addIdentifierToIdentifierCache(Identifier id)

addAssetToIdentifierCache

public static void addAssetToIdentifierCache(Inode webAsset)

getPathFromIdCache

public static Identifier getPathFromIdCache(java.lang.String URI,
                                            Host host)

getPathFromIdCache

public static Identifier getPathFromIdCache(java.lang.String URI,
                                            long hostId)
This method find the identifier associated with the given URI this methods will try to find the identifier in memory but if it is not found in memory it'll be found in db and put in memory.

Parameters:
URI - uri of the identifier
hostId - host where the identifier belongs
Returns:
The identifier or an empty (inode = 0) identifier if it wasn't found in momory and db.

removeURIFromIdCache

public static void removeURIFromIdCache(java.lang.String URI,
                                        Host host)

removeURIFromIdCache

public static void removeURIFromIdCache(java.lang.String URI,
                                        long hostId)

removeAssetFromIdCache

public static void removeAssetFromIdCache(WebAsset asset)

getIdentifierByInodeFromCache

public static Identifier getIdentifierByInodeFromCache(WebAsset asset)

getIdentifierByInodeFromCache

public static Identifier getIdentifierByInodeFromCache(long webAssetInode)

removeFromIdCacheByInode

public static void removeFromIdCacheByInode(WebAsset inode)

removeFromIdCacheByInode

public static void removeFromIdCacheByInode(long inode)

clearCache

public static void clearCache()

hasIdentifier

public static boolean hasIdentifier(long webAssetInode)


Copyright © 2006 Dotmarketing, Inc. All Rights Reserved.