Java Doc for ResourceStoreImpl.java in  » Web-Server » Jigsaw » org » w3c » tools » resources » store » 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 » Web Server » Jigsaw » org.w3c.tools.resources.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.tools.resources.store.ResourceStoreImpl

ResourceStoreImpl
public class ResourceStoreImpl implements ResourceStore(Code)
A generic resource store that keeps resource in a file using the Serializer interface.

Inner Class :class ResourceIndex

Field Summary
protected  ResourceStoreManagermanager
     Our resource store manager.
 booleanmodified
     Has this repository been modified.
 Filerepository
     Our underlying associated file.
 Hashtableresources
     The resources we know about: maps identifier to resource objects.
protected  Serializerserializer
     Our Resource Serializer.
 Objecttoken
     Our token within the resource store manager.
final static  intwriterSize
    


Method Summary
public synchronized  booleanacceptUnload()
     Can this resource store be unloaded now ? This method gets called by the ResourceStoreManager before calling the shutdown method, when possible.
public synchronized  voidaddResource(Resource resource)
     Add this resource to this resource store.
public  EnumerationenumerateResourceIdentifiers()
     Enumerate all the resources saved in this store.
public  StringgetIdentifier()
     Get the identifier for that store.
public  intgetVersion()
     Get the version of that resource store. Version numbers are used to distinguish between pickling format.
public  booleanhasResource(String identifier)
     Check for the existence of a resource in this store.
Parameters:
  identifier - The identifier of the resource to check.
public  voidinitialize(ResourceStoreManager manager, Object token, File repository, Serializer serializer)
     This resource store is being built, initialize it with the given arg.
protected synchronized  voidinternalSave(boolean unload)
     Internal save: save the repository back to disk.
public  ResourceloadResource(String identifier, Hashtable defs)
     Restore the resource whose name is given. This method doesn't assume that the resource will actually be restored, it can be kept in a cache by the ResourceStore object, and the cached version of the resource may be returned.
Parameters:
  identifier - The identifier of the resource to restore.
Parameters:
  defs - Default attribute values.
protected synchronized  voidloadResources()
    
public  ResourcelookupResource(String identifier)
     Get this resource, but only if already loaded. The resource store may (recommended) maintain a cache of the resource it loads from its store.
protected  voidmarkModified()
    
public  voidmarkModified(Resource resource)
     Mark this resource as modified.
final protected  voidmarkUsed()
     Mark the store as having been used recently.
public synchronized  voidremoveResource(String identifier)
     Remove this resource from the repository.
public synchronized  voidrenameResource(String oldid, String newid)
     Rename a given resource.
public  voidsave()
     Save this store.
public  voidsaveResource(Resource resource)
     Stabilize the given resource.
public synchronized  voidshutdown()
     Shutdown this store.
protected  voidwarning(String msg)
     Emit the given string as a warning, to whoever it is appropriate.

Field Detail
manager
protected ResourceStoreManager manager(Code)
Our resource store manager.



modified
boolean modified(Code)
Has this repository been modified.



repository
File repository(Code)
Our underlying associated file.



resources
Hashtable resources(Code)
The resources we know about: maps identifier to resource objects.



serializer
protected Serializer serializer(Code)
Our Resource Serializer.



token
Object token(Code)
Our token within the resource store manager.



writerSize
final static int writerSize(Code)





Method Detail
acceptUnload
public synchronized boolean acceptUnload()(Code)
Can this resource store be unloaded now ? This method gets called by the ResourceStoreManager before calling the shutdown method, when possible. An implementation of that method is responsible for checking the acceptUnload method of all its loaded resource before returning true, meaning that the resource store can be unloaded. A boolean true if the resource store can beunloaded.



addResource
public synchronized void addResource(Resource resource)(Code)
Add this resource to this resource store.
Parameters:
  resource - The resource to be added.



enumerateResourceIdentifiers
public Enumeration enumerateResourceIdentifiers()(Code)
Enumerate all the resources saved in this store. An enumeration of Strings, giving the identifier for all the resources that this store knows about.



getIdentifier
public String getIdentifier()(Code)
Get the identifier for that store. A uniq store identifier, as a String.



getVersion
public int getVersion()(Code)
Get the version of that resource store. Version numbers are used to distinguish between pickling format. A resource store implementator has the duty of bumping the returned number whenever it's archiving format changes. Resource stores that relies on some external archiving mechanisms (such as a database), may return a constant. An integer version number.



hasResource
public boolean hasResource(String identifier)(Code)
Check for the existence of a resource in this store.
Parameters:
  identifier - The identifier of the resource to check. A boolean true if the resource existsin this store, false otherwise.



initialize
public void initialize(ResourceStoreManager manager, Object token, File repository, Serializer serializer)(Code)
This resource store is being built, initialize it with the given arg.
Parameters:
  manager - The ResourceStoreManager instance that asks yourselfto initialize.
Parameters:
  token - The resource store manager key to that resource store, this token should be used when calling methods from the manager thatare to act on yourself.
Parameters:
  repository - A file, giving the location of the associated repository.



internalSave
protected synchronized void internalSave(boolean unload) throws IOException(Code)
Internal save: save the repository back to disk.
Parameters:
  unload - Should we unload any existing resources ?



loadResource
public Resource loadResource(String identifier, Hashtable defs) throws InvalidResourceException(Code)
Restore the resource whose name is given. This method doesn't assume that the resource will actually be restored, it can be kept in a cache by the ResourceStore object, and the cached version of the resource may be returned.
Parameters:
  identifier - The identifier of the resource to restore.
Parameters:
  defs - Default attribute values. If the resource needs to berestored from its pickled version, this Hashtable providesa set of default values for some of the attributes. A Resource instance, or null.
exception:
  InvalidResourceException - If the resource could notbe restored from the store.



loadResources
protected synchronized void loadResources()(Code)



lookupResource
public Resource lookupResource(String identifier)(Code)
Get this resource, but only if already loaded. The resource store may (recommended) maintain a cache of the resource it loads from its store. If the resource having this identifier has already been loaded, return it, otherwise, return null.
Parameters:
  identifier - The resource identifier. A Resource instance, or null.



markModified
protected void markModified()(Code)



markModified
public void markModified(Resource resource)(Code)
Mark this resource as modified.
Parameters:
  resource - The resource that has changed (and will have to bepickled some time latter).



markUsed
final protected void markUsed()(Code)
Mark the store as having been used recently.



removeResource
public synchronized void removeResource(String identifier)(Code)
Remove this resource from the repository.
Parameters:
  identifier - The identifier of the resource to be removed.



renameResource
public synchronized void renameResource(String oldid, String newid)(Code)
Rename a given resource.
Parameters:
  oldid - The olde resource identifier.
Parameters:
  newid - The new resource identifier.



save
public void save()(Code)
Save this store.



saveResource
public void saveResource(Resource resource)(Code)
Stabilize the given resource.
Parameters:
  resource - The resource to save.



shutdown
public synchronized void shutdown()(Code)
Shutdown this store.



warning
protected void warning(String msg)(Code)
Emit the given string as a warning, to whoever it is appropriate.
Parameters:
  msg - The warning message.



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.