com.atlassian.user.impl.cache
Class EntityRepositoryCache

java.lang.Object
  extended bycom.atlassian.user.impl.cache.EntityRepositoryCache

public class EntityRepositoryCache
extends java.lang.Object

The repository cache is a cache where the key is the entity name as a String and the value is the RepositoryIdentifier which contains the entity.

This shouldn't be necessary once Entity objects are aware of the repository which manages them.

A separate cache for User and Group objects should be maintained, since they have a separate namespace for names.


Constructor Summary
EntityRepositoryCache(com.atlassian.cache.CacheFactory cacheFactory, java.lang.String cacheName)
           
 
Method Summary
 RepositoryIdentifier get(Entity entity)
          Returns the repository containing the entity if found in the case, or null if this entity is not in the cache.
 void put(Entity entity, RepositoryIdentifier repository)
           
 void remove(Entity entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRepositoryCache

public EntityRepositoryCache(com.atlassian.cache.CacheFactory cacheFactory,
                             java.lang.String cacheName)
Method Detail

put

public void put(Entity entity,
                RepositoryIdentifier repository)

get

public RepositoryIdentifier get(Entity entity)
Returns the repository containing the entity if found in the case, or null if this entity is not in the cache.


remove

public void remove(Entity entity)


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.