gov.bnl.star.offline.scheduler.policy.copyselector
Class CopySelectorFactory

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.policy.copyselector.CopySelectorFactory

public class CopySelectorFactory
extends java.lang.Object

Selects which Copyselector should be used for the given query. The factory allows different CopySelectors to be built, and used in different circumstances. It makes the code more manageble and mantainable.

Author:
Gabriele Carcassi & Pavel Jakl

Constructor Summary
CopySelectorFactory()
           
 
Method Summary
static CopySelector createCopySelector(CatalogQuery query, Request request)
          Returns the Copy selector to be used on a given query of a given request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopySelectorFactory

public CopySelectorFactory()
Method Detail

createCopySelector

public static CopySelector createCopySelector(CatalogQuery query,
                                              Request request)
Returns the Copy selector to be used on a given query of a given request. Parameters of the query and the request are used to determine which CopySelector to use. For example, if singleCopy="false" in the query, then AllCopiesSelector will be used; if minFilesPerProcess is specified, than MinMaxSingleCopySelector is used.

Parameters:
query - the query on which result the selection should be made
request - the request that contained the query
Returns:
the CopySelector to use


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.