Interface DIHWriter
-
- All Known Implementing Classes:
DIHWriterBase,SolrWriter
public interface DIHWriter- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Release resources used by this writer.voidcommit(boolean optimize)If this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performancevoiddeleteByQuery(String q)Delete from the writer's underlying data store based the passed-in writer-specific query.voiddeleteDoc(Object key)Delete from the writer's underlying data store based on the passed-in Primary KeyvoiddoDeleteAll()Delete everything from the writer's underlying data storevoidinit(Context context)Provide context information for this writer.voidrollback()If this writer supports transactions or commit points, then roll back any uncommitted changes.voidsetDeltaKeys(Set<Map<String,Object>> deltaKeys)Specify the keys to be modified by a delta update (required by writers that can store duplicate keys)booleanupload(SolrInputDocument doc)Add a document to this writer's underlying data store.
-
-
-
Method Detail
-
commit
void commit(boolean optimize)
If this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performance
-
close
void close()
Release resources used by this writer. After calling close, reads & updates will throw exceptions.
-
rollback
void rollback()
If this writer supports transactions or commit points, then roll back any uncommitted changes.
-
deleteByQuery
void deleteByQuery(String q)
Delete from the writer's underlying data store based the passed-in writer-specific query. (Optional Operation)
-
doDeleteAll
void doDeleteAll()
Delete everything from the writer's underlying data store
-
deleteDoc
void deleteDoc(Object key)
Delete from the writer's underlying data store based on the passed-in Primary Key
-
upload
boolean upload(SolrInputDocument doc)
Add a document to this writer's underlying data store.
- Returns:
- true on success, false on failure
-
init
void init(Context context)
Provide context information for this writer. init() should be called before using the writer.
-
-