Xindice API
version 1.2m1

org.apache.xindice.core.cache
Interface DocumentCache

All Known Implementing Classes:
DocumentCacheImpl

public interface DocumentCache

DocumentCache implements a simple caching system for Collection resources.

Version:
$Revision: 594581 $, $Date: 2007-11-13 11:59:33 -0500 (Tue, 13 Nov 2007) $

Nested Class Summary
static class DocumentCache.CacheKey
          Cache key consists of collection and resource key
 
Field Summary
static int BINARY
          Binary resource type
static int COMPRESSED
          Compressed document resource type
static int UNCOMPRESSED
          Uncompressed document resource type
 
Method Summary
 Entry getEntry(Collection col, Key key)
          Obtains resource entry from the cache
 Entry getEntryMeta(Collection col, Key key)
          Obtains resource entry metadata from cache.
 void putEntry(Collection col, Key key, int type, Value value, Map meta)
          Stores resource entry value in the cache
 void putEntryMeta(Collection col, Key key, int type, Map meta)
          Stores resource meta entry in the cache
 void removeEntry(Collection col, Key key)
          Remove resource entry from the cache
 

Field Detail

COMPRESSED

public static final int COMPRESSED
Compressed document resource type

See Also:
Constant Field Values

UNCOMPRESSED

public static final int UNCOMPRESSED
Uncompressed document resource type

See Also:
Constant Field Values

BINARY

public static final int BINARY
Binary resource type

See Also:
Constant Field Values
Method Detail

getEntry

public Entry getEntry(Collection col,
                      Key key)
Obtains resource entry from the cache

Parameters:
col - resource collection
key - resource key
Returns:
entry cached resource entry or null if not present

getEntryMeta

public Entry getEntryMeta(Collection col,
                          Key key)
Obtains resource entry metadata from cache.

Parameters:
col - resource collection
key - resource key
Returns:
entry cached resource metadata or null if not present

putEntry

public void putEntry(Collection col,
                     Key key,
                     int type,
                     Value value,
                     Map meta)
Stores resource entry value in the cache

Parameters:
col - resource collection
key - resource key
type - resource type: COMPRESSED, UNCOMPRESSED, BINARY
value - entry value
meta - resource meta attributes map

putEntryMeta

public void putEntryMeta(Collection col,
                         Key key,
                         int type,
                         Map meta)
Stores resource meta entry in the cache

Parameters:
col - resource collection
key - resource key
type - resource type: COMPRESSED, UNCOMPRESSED, BINARY
meta - resource metadata attributes map

removeEntry

public void removeEntry(Collection col,
                        Key key)
Remove resource entry from the cache

Parameters:
col - resource collection
key - resource key

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.