org.jboss.cache.util
Interface Caches.ChildSelector<T>

All Known Implementing Classes:
Caches.HashKeySelector
Enclosing class:
Caches

public static interface Caches.ChildSelector<T>

Returns a segment (child node name) to use based on the characteristics of a key.

Here is an example class which selects a child based on a person's department:

 public static class DepartmentSelector implements ChildSelector<Person>
 {
    public Object childName(Person key)
    {
       return key.getDepartment();
    }
 }
 


Method Summary
 Fqn childName(T key)
          Returns a child node name for a key.
 

Method Detail

childName

Fqn childName(T key)
Returns a child node name for a key.

Parameters:
key - for calls to Map.put(K, V), Map.get(java.lang.Object) etc.
Returns:
node name


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.