Source Code Cross Referenced for CacheProp.java in  » Web-Server » Jigsaw » org » w3c » jigsaw » proxy » 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.jigsaw.proxy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // CacheProp.java
002:        // $Id: CacheProp.java,v 1.16 2000/08/16 21:37:43 ylafon Exp $
003:        // (c) COPYRIGHT MIT and INRIA, 1996.
004:        // Please first read the full copyright statement in file COPYRIGHT.html
005:
006:        package org.w3c.jigsaw.proxy;
007:
008:        import org.w3c.tools.resources.Attribute;
009:        import org.w3c.tools.resources.AttributeRegistry;
010:        import org.w3c.tools.resources.BooleanAttribute;
011:        import org.w3c.tools.resources.DoubleAttribute;
012:        import org.w3c.tools.resources.FileAttribute;
013:        import org.w3c.tools.resources.IntegerAttribute;
014:        import org.w3c.tools.resources.LongAttribute;
015:        import org.w3c.tools.resources.StringAttribute;
016:
017:        import org.w3c.jigsaw.http.httpd;
018:
019:        import org.w3c.jigsaw.config.PropertySet;
020:
021:        import org.w3c.www.protocol.http.HttpManager;
022:        import org.w3c.www.protocol.http.cache.CacheFilter;
023:        import org.w3c.www.protocol.http.cache.CacheStore;
024:
025:        class CacheProp extends PropertySet {
026:            private static String title = "Cache properties";
027:
028:            static {
029:                Class c = null;
030:                Attribute a = null;
031:
032:                try {
033:                    c = Class.forName("org.w3c.jigsaw.proxy.CacheProp");
034:                } catch (Exception ex) {
035:                    ex.printStackTrace();
036:                    System.exit(1);
037:                }
038:                // The Cache directory
039:                a = new FileAttribute(CacheStore.CACHE_DIRECTORY_P, null,
040:                        Attribute.EDITABLE);
041:                AttributeRegistry.registerAttribute(c, a);
042:                // The cache size in bytes:
043:                a = new LongAttribute(CacheFilter.CACHE_SIZE_P, new Long(
044:                        20971520), Attribute.EDITABLE);
045:                AttributeRegistry.registerAttribute(c, a);
046:                // The cache store size (the maximum disc used by the resources,
047:                // not the database or the headers
048:                a = new LongAttribute(CacheStore.STORE_SIZE_P, new Long(
049:                        23068672), Attribute.EDITABLE);
050:                AttributeRegistry.registerAttribute(c, a);
051:                // The debug flag:
052:                a = new BooleanAttribute(CacheFilter.DEBUG_P, Boolean.FALSE,
053:                        Attribute.EDITABLE);
054:                AttributeRegistry.registerAttribute(c, a);
055:                // The is-shared flag:
056:                a = new BooleanAttribute(CacheFilter.SHARED_P, Boolean.TRUE,
057:                        Attribute.EDITABLE);
058:                AttributeRegistry.registerAttribute(c, a);
059:                // Is the cache to be connected ?
060:                a = new BooleanAttribute(CacheFilter.CACHE_CONNECTED_P,
061:                        Boolean.TRUE, Attribute.EDITABLE);
062:                AttributeRegistry.registerAttribute(c, a);
063:                // Are garbage collections allowed ?
064:                a = new BooleanAttribute(
065:                        CacheStore.GARBAGE_COLLECTION_ENABLED_P, Boolean.TRUE,
066:                        Attribute.EDITABLE);
067:                AttributeRegistry.registerAttribute(c, a);
068:                // The allowed file size ratio:
069:                a = new DoubleAttribute(CacheStore.FILE_SIZE_RATIO_P,
070:                        new Double((double) 0.1), Attribute.EDITABLE);
071:                AttributeRegistry.registerAttribute(c, a);
072:                // the gabrage collection ration, the % of the cache to be kept
073:                // after a gc
074:                a = new DoubleAttribute(
075:                        CacheStore.GARBAGE_COLLECTION_THRESHOLD_P, new Double(
076:                                (double) 0.8), Attribute.EDITABLE);
077:                AttributeRegistry.registerAttribute(c, a);
078:                // the delay between two synchronization of the store
079:                a = new LongAttribute(CacheStore.SYNCHRONIZATION_DELAY_P,
080:                        new Long(60000), Attribute.EDITABLE);
081:                AttributeRegistry.registerAttribute(c, a);
082:                // the delay between two attempts to compact generations
083:                a = new LongAttribute(CacheStore.GENERATION_COMPACT_DELAY_P,
084:                        new Long(60000), Attribute.EDITABLE);
085:                AttributeRegistry.registerAttribute(c, a);
086:                // the maximum unmber of cached resources in the store
087:                a = new IntegerAttribute(CacheStore.MAX_CACHED_RESOURCES_P,
088:                        new Integer(50000), Attribute.EDITABLE);
089:                AttributeRegistry.registerAttribute(c, a);
090:                // the maximum unmber of generations
091:                a = new IntegerAttribute(CacheStore.MAX_GENERATIONS_P,
092:                        new Integer(10), Attribute.EDITABLE);
093:                AttributeRegistry.registerAttribute(c, a);
094:                // the Class of the validator
095:                a = new StringAttribute(CacheFilter.VALIDATOR_P, null,
096:                        Attribute.EDITABLE);
097:                AttributeRegistry.registerAttribute(c, a);
098:                // the Class of the Sweeper
099:                a = new StringAttribute(CacheFilter.SWEEPER_P, null,
100:                        Attribute.EDITABLE);
101:                AttributeRegistry.registerAttribute(c, a);
102:                // the Class of the Serializer
103:                a = new StringAttribute(CacheFilter.SERIALIZER_P, null,
104:                        Attribute.EDITABLE);
105:                AttributeRegistry.registerAttribute(c, a);
106:            }
107:
108:            /**
109:             * Get this property set title.
110:             * @return A String encoded title.
111:             */
112:
113:            public String getTitle() {
114:                return title;
115:            }
116:
117:            CacheProp(String name, httpd server) {
118:                super(name, server);
119:            }
120:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.