DIHCacheSupport (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.DIHCacheSupport 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 DIHCacheSupport

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

    public class DIHCacheSupport

extends Object

Field Summary
`static String` | `CACHE_DELETE_PRIOR_DATA` If the cache supports persistent data, set to "true" to delete any prior persisted data before running the entity.
`static String` | `CACHE_FOREIGN_KEY` Specify the Foreign Key from the parent entity to join on.
`static String` | `CACHE_IMPL` Specify the class for the cache implementation
`static String` | `CACHE_PRIMARY_KEY` Specify the Primary Key field from this Entity to map the input records with
`static String` | `CACHE_READ_ONLY` If true, a pre-existing cache is re-opened for read-only access.

Constructor Summary
`DIHCacheSupport(Context context, String cacheImplName)`

Method Summary
`void` | `destroyAll()`
`Map<String,Object>` | `getCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)`
`protected Map<String,Object>` | `getFromRowCacheTransformed()`
`protected Map<String,Object>` | `getIdCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)` If the where clause is present the cache is sql Vs Map of key Vs List of Rows.
`protected Map<String,Object>` | `getSimpleCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)` If where clause is not present the cache is a Map of query vs List of Rows.
`void` | `initNewParent(Context context)`
`void` | `populateCache(String query, Iterator<Map<String,Object>> rowIterator)` Get all the rows from the datasource for the given query and cache them

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

Field Detail

### CACHE_IMPL

    public static final String CACHE_IMPL

  Specify the class for the cache implementation

  See Also:
    Constant Field Values

### CACHE_DELETE_PRIOR_DATA

    public static final String CACHE_DELETE_PRIOR_DATA

  If the cache supports persistent data, set to "true" to delete any prior persisted data before running the entity.

  See Also:
    Constant Field Values

### CACHE_FOREIGN_KEY

    public static final String CACHE_FOREIGN_KEY

  Specify the Foreign Key from the parent entity to join on. Use if the cache is on a child entity.

  See Also:
    Constant Field Values

### CACHE_PRIMARY_KEY

    public static final String CACHE_PRIMARY_KEY

  Specify the Primary Key field from this Entity to map the input records with

  See Also:
    Constant Field Values

### CACHE_READ_ONLY

    public static final String CACHE_READ_ONLY

  If true, a pre-existing cache is re-opened for read-only access.

  See Also:
    Constant Field Values

Constructor Detail

### DIHCacheSupport

    public DIHCacheSupport(Context context,
                           String cacheImplName)

Method Detail

### initNewParent

    public void initNewParent(Context context)

### destroyAll

    public void destroyAll()

### populateCache

    public void populateCache(String query,
                              Iterator<Map<String,Object>> rowIterator)

  Get all the rows from the datasource for the given query and cache them

### getCacheData

    public Map<String,Object> getCacheData(Context context,
                                           String query,
                                           Iterator<Map<String,Object>> rowIterator)

### getIdCacheData

    protected Map<String,Object> getIdCacheData(Context context,
                                                String query,
                                                Iterator<Map<String,Object>> rowIterator)

  If the where clause is present the cache is sql Vs Map of key Vs List of Rows.

  Parameters:
    `query` - the query string for which cached data is to be returned
  Returns:
    the cached row corresponding to the given query after all variables have been resolved

### getSimpleCacheData

    protected Map<String,Object> getSimpleCacheData(Context context,
                                                    String query,
                                                    Iterator<Map<String,Object>> rowIterator)

  If where clause is not present the cache is a Map of query vs List of Rows.

  Parameters:
    `query` - string for which cached row is to be returned
  Returns:
    the cached row corresponding to the given query

### getFromRowCacheTransformed

    protected Map<String,Object> getFromRowCacheTransformed()

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