Java Doc for NegativeCache.java in  » Apache-Harmony-Java-SE » java-package » java » net » 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 » Apache Harmony Java SE » java package » java.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.net.NegativeCache

NegativeCache
class NegativeCache extends LinkedHashMap (Code)
This class is used to manage the negative name lookup cache.


Field Summary
final static  floatLOADING
    
final static  intMAX_NEGATIVE_ENTRIES
    
static  NegativeCache<String, NegCacheElement>negCache
    

Constructor Summary
 NegativeCache(int initialCapacity, float loadFactor, boolean accessOrder)
    

Method Summary
static  voidcheckCacheExists()
    
static  StringgetFailedMessage(String hostName)
    
static  voidput(String hostName, String failedMessage)
    
protected  booleanremoveEldestEntry(Map.Entry<K, V> eldest)
     Answers if we should remove the Eldest entry.

Field Detail
LOADING
final static float LOADING(Code)



MAX_NEGATIVE_ENTRIES
final static int MAX_NEGATIVE_ENTRIES(Code)



negCache
static NegativeCache<String, NegCacheElement> negCache(Code)




Constructor Detail
NegativeCache
NegativeCache(int initialCapacity, float loadFactor, boolean accessOrder)(Code)
Answers the hostname for the cache element hostName name of the host on which the lookup failed




Method Detail
checkCacheExists
static void checkCacheExists()(Code)
This method checks if we have created the cache and if not creates it



getFailedMessage
static String getFailedMessage(String hostName)(Code)
Answers the message that occurred when we failed to lookup the host if such a failure is within the cache and the entry has not yet expired
Parameters:
  hostName - the name of the host for which we are looking for an entry the message which was returned when the host failed to be lookedup if there is still a valid entry within the cache



put
static void put(String hostName, String failedMessage)(Code)
Adds the host name and the corresponding name lookup fail message to the cache
Parameters:
  hostName - the name of the host for which the lookup failed
Parameters:
  failedMessage - the message returned when we failed the lookup



removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<K, V> eldest)(Code)
Answers if we should remove the Eldest entry. We remove the eldest entry if the size has grown beyond the maximum size allowed for the cache. We create the LinkedHashMap such that this deletes the least recently used entry
Parameters:
  eldest - the map entry which will be deleted if we return true



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