voldemort.utils
Class StoreDefinitionUtils

java.lang.Object
  extended by voldemort.utils.StoreDefinitionUtils

public class StoreDefinitionUtils
extends java.lang.Object


Constructor Summary
StoreDefinitionUtils()
           
 
Method Summary
static java.util.List<StoreDefinition> filterStores(java.util.List<StoreDefinition> storeDefs, boolean isReadOnly)
          Given a list of store definitions, filters the list depending on the boolean
static StoreDefinition getStoreDefinitionWithName(java.util.List<StoreDefinition> storeDefs, java.lang.String storeName)
          Given a store name and a list of store definitions, returns the appropriate store definition ( if it exists )
static java.util.List<java.lang.String> getStoreNames(java.util.List<StoreDefinition> storeDefList)
          Given a list of store definitions return a list of store names
static java.util.HashMap<StoreDefinition,java.lang.Integer> getUniqueStoreDefinitionsWithCounts(java.util.List<StoreDefinition> storeDefs)
          Given a list of store definitions, find out and return a map of similar store definitions + count of them
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreDefinitionUtils

public StoreDefinitionUtils()
Method Detail

filterStores

public static java.util.List<StoreDefinition> filterStores(java.util.List<StoreDefinition> storeDefs,
                                                           boolean isReadOnly)
Given a list of store definitions, filters the list depending on the boolean

Parameters:
storeDefs - Complete list of store definitions
isReadOnly - Boolean indicating whether filter on read-only or not?
Returns:
List of filtered store definition

getStoreNames

public static java.util.List<java.lang.String> getStoreNames(java.util.List<StoreDefinition> storeDefList)
Given a list of store definitions return a list of store names

Parameters:
storeDefList - The list of store definitions
Returns:
Returns a list of store names

getStoreDefinitionWithName

public static StoreDefinition getStoreDefinitionWithName(java.util.List<StoreDefinition> storeDefs,
                                                         java.lang.String storeName)
Given a store name and a list of store definitions, returns the appropriate store definition ( if it exists )

Parameters:
storeDefs - List of store definitions
storeName - The store name whose store definition is required
Returns:
The store definition

getUniqueStoreDefinitionsWithCounts

public static java.util.HashMap<StoreDefinition,java.lang.Integer> getUniqueStoreDefinitionsWithCounts(java.util.List<StoreDefinition> storeDefs)
Given a list of store definitions, find out and return a map of similar store definitions + count of them

Parameters:
storeDefs - All store definitions
Returns:
Map of a unique store definition + counts


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu