Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:solrmarc:custom_java_best_practices
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
indexing:solrmarc:custom_java_best_practices [2017/01/23 21:29] – demiankatz | indexing:solrmarc:custom_java_best_practices [2020/09/22 14:13] – demiankatz | ||
---|---|---|---|
Line 8: | Line 8: | ||
* Use distinctive method names; if you have the same method name in multiple classes, you will have to disambiguate the class name in your marc.properties file. Using distinctive names makes the shorthand syntax more reliable. | * Use distinctive method names; if you have the same method name in multiple classes, you will have to disambiguate the class name in your marc.properties file. Using distinctive names makes the shorthand syntax more reliable. | ||
* If your custom code needs to access public methods from the core SolrIndexer class, use SolrIndexer.instance() to reach them. | * If your custom code needs to access public methods from the core SolrIndexer class, use SolrIndexer.instance() to reach them. | ||
- | * If your custom code needs to cache or persist values, create a thread-safe singleton to encapsulate those values. You can see an example of this pattern in the [[https:// | + | * If your custom code needs to cache or persist values, create a thread-safe singleton to encapsulate those values. You can see an example of this pattern in the [[https:// |
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
indexing/solrmarc/custom_java_best_practices.txt · Last modified: 2023/11/28 19:56 by demiankatz