Java Doc for ReplicaCatalogEntry.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » common » catalog » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » pegasus 2.1.0 » org.griphyn.common.catalog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.common.catalog.ReplicaCatalogEntry

ReplicaCatalogEntry
public class ReplicaCatalogEntry implements CatalogEntry(Code)
The entry is a high-level logical structure representing the physical filename, the site handle, and optional attributes related to the PFN as one entity.

The resource handle is the most frequently used attribute. In reality, the resource handle may be a relational attribute of the mapping relation between an LFN and a PFN - there is disagreement among the developers on this issue. For simplicity purposes, it appears to be sufficient to make the resource handle a regular PFN attribute.


author:
   Jens-S. Vöckler
author:
   Karan Vahi
version:
   $Revision: 50 $



Field Summary
final public static  StringRESOURCE_HANDLE
     The (reserved) attribute name used for the resource handle.

Constructor Summary
public  ReplicaCatalogEntry()
     Default constructor for arrays.
public  ReplicaCatalogEntry(String pfn)
     Convenience constructor initializes the PFN.
public  ReplicaCatalogEntry(String pfn, String handle)
     Convenience constructor initializes the PFN and the resource handle.
public  ReplicaCatalogEntry(String pfn, Map attributes)
     Standard constructor initializes the PFN and arbitrary attributes.

Method Summary
public  voidaddAttribute(String key, Object value)
     Adds an attribute to the set of attributes.
public  voidaddAttribute(Map attributes)
     Adds attributes to the existing attributes.
public  booleanequals(Object obj)
     Matches two ReplicaCatalogEntry objects.
public  ObjectgetAttribute(String key)
     Obtains the attribute value for a given key.
public  intgetAttributeCount()
     Counts the number of attributes known for the PFN.
public  IteratorgetAttributeIterator()
     Provides an iterator to traverse the attributes by their keys.
public  StringgetPFN()
     Accessor: Obtains the PFN portion from this entry.
public  StringgetResourceHandle()
     Obtains the resource handle from the attributes map.
public  booleanhasAttribute(String key)
     Checks for the existence of an attribute key.
public static  ReplicaCatalogEntrymerge(ReplicaCatalogEntry a, ReplicaCatalogEntry b, boolean overwrite)
     Merges the attribute maps of two entries in a controlled fashion. Entries are only merged with another entry, if the physical filenames match.
Parameters:
  a - is one replica catalog entry to merge.
Parameters:
  b - is the other replica catalog entry to merge.
public  booleanmerge(ReplicaCatalogEntry rce, boolean overwrite)
     Merges the attribute maps in a controlled fashion.
public  voidremoveAllAttribute()
     Removes all attributes associated with a PFN.
public  ObjectremoveAttribute(String name)
     Removes a specific attribute.
Parameters:
  name - is the name of the attribute to remove.
public  voidsetAttribute(String key, Object value)
     Adds a new or overwrites an existing attribute.
public  voidsetAttribute(Map attributes)
     Replaces all existing attributes with new attributes.
public  voidsetPFN(String pfn)
     Accessor: Sets a new PFN to remember.
public  voidsetResourceHandle(String handle)
     Sets a new resource handle to remember as PFN attribute.
public  StringtoString()
     Converts the contents into a string.

Field Detail
RESOURCE_HANDLE
final public static String RESOURCE_HANDLE(Code)
The (reserved) attribute name used for the resource handle.




Constructor Detail
ReplicaCatalogEntry
public ReplicaCatalogEntry()(Code)
Default constructor for arrays. The PFN is initialized to null, and thus must be explicitly set later. The map of attributes associated with the PFN is initialized to be empty. Thus, no resource handle is available.



ReplicaCatalogEntry
public ReplicaCatalogEntry(String pfn)(Code)
Convenience constructor initializes the PFN. The map of attributes is initialized to be empty. Thus, no resource handle is avaiable.
Parameters:
  pfn - is the PFN to remember.



ReplicaCatalogEntry
public ReplicaCatalogEntry(String pfn, String handle)(Code)
Convenience constructor initializes the PFN and the resource handle. The resource handle is stored as regular PFN attribute.
Parameters:
  pfn - is the PFN to remember.
Parameters:
  handle - is the resource handle to remember.



ReplicaCatalogEntry
public ReplicaCatalogEntry(String pfn, Map attributes)(Code)
Standard constructor initializes the PFN and arbitrary attributes.
Parameters:
  pfn - is the PFN to remember.
Parameters:
  attributes - is a map of arbitrary attributes related to thePFN.




Method Detail
addAttribute
public void addAttribute(String key, Object value)(Code)
Adds an attribute to the set of attributes. Note, this is identical to the ReplicaCatalogEntry.setAttribute(String,Object) method of the same signature.
Parameters:
  key - is the key denoting an attribute.
Parameters:
  value - is a value object to store.



addAttribute
public void addAttribute(Map attributes)(Code)
Adds attributes to the existing attributes.
Parameters:
  attributes - is a map of attributes to add.
See Also:   ReplicaCatalogEntry.setAttribute(Map)
See Also:   java.util.Map.putAll(Map)



equals
public boolean equals(Object obj)(Code)
Matches two ReplicaCatalogEntry objects. The primary key in this case is the pfn and all the attributes. true if the pfn and all the attributes match, false otherwise.



getAttribute
public Object getAttribute(String key)(Code)
Obtains the attribute value for a given key.
Parameters:
  key - is the key to look up the object stored as value, may be null.
See Also:   java.util.Map.get(Object)



getAttributeCount
public int getAttributeCount()(Code)
Counts the number of attributes known for the PFN. number of attributes, may be zero.
See Also:   java.util.Map.size



getAttributeIterator
public Iterator getAttributeIterator()(Code)
Provides an iterator to traverse the attributes by their keys. an iterator over the keys to walk the attribute list.



getPFN
public String getPFN()(Code)
Accessor: Obtains the PFN portion from this entry. the physical filename, or null if unset.
See Also:   ReplicaCatalogEntry.setPFN(String)



getResourceHandle
public String getResourceHandle()(Code)
Obtains the resource handle from the attributes map. This is a convenience method. Internally, the PFN attribute map is queried for the value of the resource handle. the resource handle, or null if unset.
See Also:   ReplicaCatalogEntry.setResourceHandle(String)



hasAttribute
public boolean hasAttribute(String key)(Code)
Checks for the existence of an attribute key.
Parameters:
  key - is the key to look up true if the key is known, false otherwise.



merge
public static ReplicaCatalogEntry merge(ReplicaCatalogEntry a, ReplicaCatalogEntry b, boolean overwrite)(Code)
Merges the attribute maps of two entries in a controlled fashion. Entries are only merged with another entry, if the physical filenames match.
Parameters:
  a - is one replica catalog entry to merge.
Parameters:
  b - is the other replica catalog entry to merge.
Parameters:
  overwrite - resolves intersections. If true, uses rce'sattribute to remain, if false, the original attribute remains. the merged entry, if the PFNs matched, or nullif the PFN mismatched.



merge
public boolean merge(ReplicaCatalogEntry rce, boolean overwrite)(Code)
Merges the attribute maps in a controlled fashion. An entry is only merged with another entry, if the physical filenames match.
Parameters:
  rce - is another replica catalog entry to merge with.
Parameters:
  overwrite - resolves intersections. If true, uses rce'sattribute to remain, if false, the original attribute remains. true if a merge was attempted, false if the PFNs did notmatch.



removeAllAttribute
public void removeAllAttribute()(Code)
Removes all attributes associated with a PFN.
See Also:   ReplicaCatalogEntry.removeAttribute(String)



removeAttribute
public Object removeAttribute(String name)(Code)
Removes a specific attribute.
Parameters:
  name - is the name of the attribute to remove. the value object that was removed, or null,if the key was not in the map.
See Also:   ReplicaCatalogEntry.removeAllAttribute()



setAttribute
public void setAttribute(String key, Object value)(Code)
Adds a new or overwrites an existing attribute. Note, this is identical to the ReplicaCatalogEntry.addAttribute(String,Object) method of the same signature.
Parameters:
  key - is the name of the attribute
Parameters:
  value - is the value object associated with the attribute.



setAttribute
public void setAttribute(Map attributes)(Code)
Replaces all existing attributes with new attributes. Existing attributes are removed before attempting a shallow copy of the new attributes.
Parameters:
  attributes - is the map of new attributes to remember.
See Also:   ReplicaCatalogEntry.addAttribute(Map)



setPFN
public void setPFN(String pfn)(Code)
Accessor: Sets a new PFN to remember.
Parameters:
  pfn - is a new physical filename.
See Also:   ReplicaCatalogEntry.getPFN()



setResourceHandle
public void setResourceHandle(String handle)(Code)
Sets a new resource handle to remember as PFN attribute. This is a convenience method. Internally, the PFN attribute map is changed to remember the new resource handle.
Parameters:
  handle - is the new resource handle.
See Also:   ReplicaCatalogEntry.getResourceHandle()



toString
public String toString()(Code)
Converts the contents into a string. a textual representation of the item content.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.