|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.core.processing.CachingProcessor<IN,OUT>
IN - input type for that processorOUT - output type for that processorpublic final class CachingProcessor<IN extends MessageProvider,OUT extends MessageProvider>
A class caching the result of a Processor
You can use this over whichever processor of your choice. Internally, it
uses a LoadingCache to store results.
You can optionally pass an Equivalence as an argument for cache
keys. By default, Equivalences.equals() will be used.
| Constructor Summary | |
|---|---|
CachingProcessor(Processor<IN,OUT> processor)
Constructor |
|
CachingProcessor(Processor<IN,OUT> processor,
Equivalence<IN> equivalence)
Main constructor |
|
| Method Summary | |
|---|---|
OUT |
process(ProcessingReport report,
IN input)
Process the input |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CachingProcessor(Processor<IN,OUT> processor)
This is equivalent to calling CachingProcessor(Processor,
Equivalence) with Equivalences.equals() as the second argument.
processor - the processor
public CachingProcessor(Processor<IN,OUT> processor,
Equivalence<IN> equivalence)
processor - the processorequivalence - an equivalence to use for cache keys
NullPointerException - processor or equivalence are null| Method Detail |
|---|
public OUT process(ProcessingReport report,
IN input)
throws ProcessingException
Processor
process in interface Processor<IN extends MessageProvider,OUT extends MessageProvider>report - the report to use while processinginput - the input for this processor
ProcessingException - processing failedpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||