com.sun.sgs.impl.util
Class BindingKeyedCollectionsImpl

java.lang.Object
  extended by com.sun.sgs.impl.util.BindingKeyedCollectionsImpl
All Implemented Interfaces:
BindingKeyedCollections

public class BindingKeyedCollectionsImpl
extends Object
implements BindingKeyedCollections

An implementation of the collections factory. The kernel constructs this factory during server initialization, and it is available to services via the ComponentRegistry.


Constructor Summary
BindingKeyedCollectionsImpl(TransactionProxy txnProxy)
          Constructs an instance with the specified transaction proxy.
 
Method Summary
(package private) static DataService getDataService()
          Returns the data service relevant to the current context.
<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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingKeyedCollectionsImpl

public BindingKeyedCollectionsImpl(TransactionProxy txnProxy)
Constructs an instance with the specified transaction proxy.

Parameters:
txnProxy - the transaction proxy
Method Detail

newMap

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

Specified by:
newMap in interface BindingKeyedCollections
Type Parameters:
V - the type of the map's values
Parameters:
keyPrefix - a key prefix
Returns:
a BindingKeyedMap with the specified keyPrefix

newSet

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

Specified by:
newSet in interface BindingKeyedCollections
Type Parameters:
V - the type of the set's values
Parameters:
keyPrefix - a key prefix
Returns:
a BindingKeyedSet with the specified keyPrefix

getDataService

static DataService getDataService()
Returns the data service relevant to the current context. This method is used by BindingKeyedMapImpl to obtain the data service to store key/value pairs.

Returns:
the data service relevant to the current context
Throws:
IllegalStateException - if an instance of this class has not been initialized

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