Java Doc for IBaseAdaptor.java in  » Search-Engine » Jofti » com » jofti » cache » 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 » Search Engine » Jofti » com.jofti.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jofti.cache.IBaseAdaptor

All known Subclasses:   com.jofti.cache.BaseAdaptor,
IBaseAdaptor
public interface IBaseAdaptor (Code)




Method Summary
abstract public  voidacquireQueryLock()
     Attempts to acquire a query lock for the cache.
abstract public  voidacquireUpdateLock()
     Attempts to acquire an update lock for the cache.
abstract public  ObjectdecorateKey(Object key)
     A utility method that decorates a Cache key with a comparable wrapper if the key itself is not Comparable.
abstract public  ObjectgetCacheLock(Object key)
    
abstract public  MapgetCacheValues(Map col, IParsedQuery query, ClassIntrospector introspector)
     Takes a map containing the key values returned from the Index for the Query.
abstract public  InternalIndexgetIndex()
     Returns the Index instance from the adapter.
public  MaplimitResults(Map temp, int startResult, int maxResults)
     Takes a fully populated result set and applies any of the limiting steps defined in the maxResults or startResults.
public  IndexQueryprocessQuery(IndexQuery query, ParserManager manager)
     Normalises the query format for convenience queries or processes one the unparsed text query formats into its parsed form.
abstract public  Mapquery(IndexQuery query)
    
abstract public  voidreleaseQueryLock()
     Releases a query lock.
abstract public  voidreleaseUpdateLock()
     Releases an update lock.
abstract public  ObjectstripKey(Object key)
     A utility method that strips a decorated Cache key of its comparable wrapper if it has been previously decorated by the decorate method.



Method Detail
acquireQueryLock
abstract public void acquireQueryLock() throws JoftiException(Code)
Attempts to acquire a query lock for the cache. Multiple queries can run in parallel as the Index itself is threadsafe and the assumption is that the Cache is also.

However, queries and updates cannot run at the same time to prevent situations where if multiple nodes in the index are updated by one update then a query which runs at the same time may well misreport a match that should be returned if they were run in sequence.


throws:
  JoftiException -



acquireUpdateLock
abstract public void acquireUpdateLock() throws JoftiException(Code)
Attempts to acquire an update lock for the cache. Multiple updates can run in parallel as the Index itself is threadsafe and the assumption is that the Cache is also.

However, queries and updates cannot run at the same time to prevent situations where if multiple nodes in the index are updated by one update then a query which runs at the same time may well misreport a match that should be returned if they were run in sequence.


throws:
  JoftiException -



decorateKey
abstract public Object decorateKey(Object key)(Code)
A utility method that decorates a Cache key with a comparable wrapper if the key itself is not Comparable. This wrapper is not propogated into the Cache, but is used to wrap the key when placed in the Index.
Parameters:
  key - Either an instance of a NonComparableKeyWrapper if the key is not Comparable or the original key object.



getCacheLock
abstract public Object getCacheLock(Object key)(Code)
Gets a cache lock based on the mod of the hashcode of the key
Parameters:
  key - - a lock Object



getCacheValues
abstract public Map getCacheValues(Map col, IParsedQuery query, ClassIntrospector introspector) throws JoftiException(Code)
Takes a map containing the key values returned from the Index for the Query. The keys are the primary keys in the Cache.

This is the default implementation that loops through the returned keys and extracts the appropriate value from the Cache. This method is also responsible for checking if the value has changed since it was last indexed or if the value is no longer in the Cache excluding it from the returned results.


Parameters:
  col - A Map of result keys A Map of key/value results.
throws:
  JoftiException - Thrown if the retrieval from the cache throws an exception




getIndex
abstract public InternalIndex getIndex()(Code)
Returns the Index instance from the adapter. the internal index implementation



limitResults
public Map limitResults(Map temp, int startResult, int maxResults)(Code)
Takes a fully populated result set and applies any of the limiting steps defined in the maxResults or startResults. 0 for both values is considered a no-op. Negative values throw a runtime exception. a Start Value larger than the result original size will return no results, a maxResults large than the result size is reset to temp.size().
Parameters:
  temp - the original result set
Parameters:
  startResult - an int defining at which record the record set should begin
Parameters:
  maxResults - an int defining the maximum number of records to return. the result set



processQuery
public IndexQuery processQuery(IndexQuery query, ParserManager manager) throws JoftiException(Code)
Normalises the query format for convenience queries or processes one the unparsed text query formats into its parsed form.
Parameters:
  query - an unparsed query
Parameters:
  manager - the Parser Manager that stores the mappings for the query the parsed query



query
abstract public Map query(IndexQuery query) throws JoftiException(Code)



releaseQueryLock
abstract public void releaseQueryLock()(Code)
Releases a query lock.



releaseUpdateLock
abstract public void releaseUpdateLock()(Code)
Releases an update lock.



stripKey
abstract public Object stripKey(Object key)(Code)
A utility method that strips a decorated Cache key of its comparable wrapper if it has been previously decorated by the decorate method.
Parameters:
  key - The object wrapped in a NonComparableKeyWrapper if wrapped or the original object if not.



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