com.sun.sgs.impl.util
Interface BindingKeyedCollections

All Known Implementing Classes:
BindingKeyedCollectionsImpl

public interface BindingKeyedCollections

A factory for creating collections whose key/value pairs are stored as service bindings. This factory may be obtained from the ComponentRegistry.

The keyPrefix supplied to the newMap and set methods specifies the service binding name prefix to use for each key in the map. That is, a value in the map (or set) is stored in the data service using its associated key (a String) as a suffix to the keyPrefix specified during construction.


Method Summary
<V> BindingKeyedMap<V>
newMap(String keyPrefix)
          Constructs an instance of a BindingKeyedMap with the specified keyPrefix.
<V> BindingKeyedSet<V>
newSet(String keyPrefix)
          Constructs an instance of a BindingKeyedSet with the specified keyPrefix.
 

Method Detail

newMap

<V> BindingKeyedMap<V> newMap(String keyPrefix)
Constructs an instance of a BindingKeyedMap with the specified keyPrefix.

Type Parameters:
V - the type of the map's values
Parameters:
keyPrefix - a key prefix
Returns:
a BindingKeyedMap with the specified keyPrefix
Throws:
IllegalArgumentException - if keyPrefix is empty

newSet

<V> BindingKeyedSet<V> newSet(String keyPrefix)
Constructs an instance of a BindingKeyedSet with the specified keyPrefix.

Type Parameters:
V - the type of the set's values
Parameters:
keyPrefix - a key prefix
Returns:
a BindingKeyedSet with the specified keyPrefix
Throws:
IllegalArgumentException - if keyPrefix is empty

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved