com.googlecode.ehcache.annotations.config
Class PatternCacheNameMatcherImpl

java.lang.Object
  extended by com.googlecode.ehcache.annotations.config.PatternCacheNameMatcherImpl
All Implemented Interfaces:
CacheNameMatcher

public class PatternCacheNameMatcherImpl
extends java.lang.Object
implements CacheNameMatcher

CacheNameMatcher that delegates to a Pattern.

Version:
$Id: PatternCacheNameMatcherImpl.java 656 2011-04-21 19:54:27Z eric.dalquist@gmail.com $
Author:
Nicholas Blair
See Also:
Pattern

Constructor Summary
PatternCacheNameMatcherImpl(java.util.regex.Pattern pattern)
           
PatternCacheNameMatcherImpl(java.lang.String regex)
           
 
Method Summary
 java.util.regex.Pattern getPattern()
           
 Vote matches(java.lang.String cacheName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternCacheNameMatcherImpl

public PatternCacheNameMatcherImpl(java.util.regex.Pattern pattern)
Parameters:
pattern -

PatternCacheNameMatcherImpl

public PatternCacheNameMatcherImpl(java.lang.String regex)
Parameters:
regex -
Throws:
java.util.regex.PatternSyntaxException - if the regex is invalid
See Also:
Pattern.compile(String)
Method Detail

matches

public Vote matches(java.lang.String cacheName)
Specified by:
matches in interface CacheNameMatcher
Returns:
Vote.YEA if this should definitely be included, Vote.NAY if definitely excluded, or Vote.ABSTAIN if impl has no opinion

getPattern

public java.util.regex.Pattern getPattern()
Returns:
the pattern


Copyright © 2011. All Rights Reserved.