|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.handler.dataimport.DIHCacheSupport
public class DIHCacheSupport
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 |
---|
public static final String CACHE_IMPL
Specify the class for the cache implementation
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.
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.
public static final String CACHE_PRIMARY_KEY
Specify the Primary Key field from this Entity to map the input records with
public static final String CACHE_READ_ONLY
If true, a pre-existing cache is re-opened for read-only access.
Constructor Detail |
---|
public DIHCacheSupport(Context context, String cacheImplName)
Method Detail |
---|
public void initNewParent(Context context)
public void destroyAll()
public void populateCache(String query, Iterator<Map<String,Object>> rowIterator)
Get all the rows from the datasource for the given query and cache them
public Map<String,Object> getCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)
protected Map<String,Object> getIdCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)
query
- the query string for which cached data is to be returned
protected Map<String,Object> getSimpleCacheData(Context context, String query, Iterator<Map<String,Object>> rowIterator)
query
- string for which cached row is to be returned
protected Map<String,Object> getFromRowCacheTransformed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |