SortedMapBackedCache (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.SortedMapBackedCache class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.handler.dataimport
Class SortedMapBackedCache

    java.lang.Object
      org.apache.solr.handler.dataimport.SortedMapBackedCache

All Implemented Interfaces:
  Iterable<Map<String,Object>>, DIHCache

    public class SortedMapBackedCache

extends Object
implements DIHCache

Constructor Summary
`SortedMapBackedCache()`

Method Summary
`void` | `add(Map<String,Object> rec)` Adds a document.
`void` | `close()` Releases resources used by this cache, if possible.
`void` | `delete(Object key)` Delete all documents associated with the given key
`void` | `deleteAll()` Delete all data from the cache,leaving the empty cache intact.
`void` | `destroy()` Closes the cache, if open.
`void` | `flush()` Persists any pending data to the cache
`Iterator<Map<String,Object>>` | `iterator()` Returns an iterator, allowing callers to iterate through the entire cache in key, then insertion, order.
`Iterator<Map<String,Object>>` | `iterator(Object key)` Returns an iterator, allowing callers to iterate through all documents that match the given key in insertion order.
`void` | `open(Context context)` Opens the cache using the specified properties.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SortedMapBackedCache

    public SortedMapBackedCache()

Method Detail

### add

    public void add(Map<String,Object> rec)

  Description copied from interface: `DIHCache`

  Adds a document. If a document already exists with the same key, both documents will exist in the cache, as the cache allows duplicate keys. To update a key's documents, first call delete(Object key).

  Specified by:
    `add` in interface `DIHCache`

### close

    public void close()

  Description copied from interface: `DIHCache`

  Releases resources used by this cache, if possible. The cache is flushed but not destroyed.

  Specified by:
    `close` in interface `DIHCache`

### delete

    public void delete(Object key)

  Description copied from interface: `DIHCache`

  Delete all documents associated with the given key

  Specified by:
    `delete` in interface `DIHCache`

### deleteAll

    public void deleteAll()

  Description copied from interface: `DIHCache`

  Delete all data from the cache,leaving the empty cache intact.

  Specified by:
    `deleteAll` in interface `DIHCache`

### destroy

    public void destroy()

  Description copied from interface: `DIHCache`

  Closes the cache, if open. Then removes all data, possibly removing the cache entirely from persistent storage.

  Specified by:
    `destroy` in interface `DIHCache`

### flush

    public void flush()

  Description copied from interface: `DIHCache`

  Persists any pending data to the cache

  Specified by:
    `flush` in interface `DIHCache`

### iterator

    public Iterator<Map<String,Object>> iterator(Object key)

  Description copied from interface: `DIHCache`

  Returns an iterator, allowing callers to iterate through all documents that match the given key in insertion order.

  Specified by:
    `iterator` in interface `DIHCache`

### iterator

    public Iterator<Map<String,Object>> iterator()

  Description copied from interface: `DIHCache`

  Returns an iterator, allowing callers to iterate through the entire cache in key, then insertion, order.

  Specified by:
    `iterator` in interface `Iterable<Map<String,Object>>`
  Specified by:
    `iterator` in interface `DIHCache`

### open

    public void open(Context context)

  Description copied from interface: `DIHCache`

  Opens the cache using the specified properties. The `Context` includes any parameters needed by the cache impl. This must be called before any read/write operations are permitted.

  Specified by:
    `open` in interface `DIHCache`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD