Spring Data Core

org.springframework.data.support
Class CachingIsNewStrategyFactory

java.lang.Object
  extended by org.springframework.data.support.CachingIsNewStrategyFactory
All Implemented Interfaces:
IsNewStrategyFactory

public class CachingIsNewStrategyFactory
extends Object
implements IsNewStrategyFactory

IsNewStrategyFactory that caches resolved IsNewStrategy instances per type to avoid re-resolving them on each and every request.

Author:
Oliver Gierke

Constructor Summary
CachingIsNewStrategyFactory(IsNewStrategyFactory delegate)
          Creates a new CachingIsNewStrategyFactory delegating to the given IsNewStrategyFactory.
 
Method Summary
 IsNewStrategy getIsNewStrategy(Class<?> type)
          Returns the IsNewStrategy to be used for the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingIsNewStrategyFactory

public CachingIsNewStrategyFactory(IsNewStrategyFactory delegate)
Creates a new CachingIsNewStrategyFactory delegating to the given IsNewStrategyFactory.

Parameters:
delegate - must not be null.
Method Detail

getIsNewStrategy

public IsNewStrategy getIsNewStrategy(Class<?> type)
Description copied from interface: IsNewStrategyFactory
Returns the IsNewStrategy to be used for the given type.

Specified by:
getIsNewStrategy in interface IsNewStrategyFactory
Parameters:
type - must not be null.
Returns:
the IsNewStrategy to be used for the given type, will never be null.

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.