Search in sources :

Example 1 with GlobalMarshaller

use of org.infinispan.marshall.core.GlobalMarshaller in project infinispan by infinispan.

the class CommandsFactoryImpl method getValueMatcher.

private ValueMatcher getValueMatcher(Object o) {
    SerializeFunctionWith ann = o.getClass().getAnnotation(SerializeFunctionWith.class);
    if (ann != null)
        return ValueMatcher.valueOf(ann.valueMatcher().toString());
    Externalizer ext = ((GlobalMarshaller) marshaller).findExternalizerFor(o);
    if (ext instanceof LambdaExternalizer)
        return ValueMatcher.valueOf(((LambdaExternalizer) ext).valueMatcher(o).toString());
    return ValueMatcher.MATCH_ALWAYS;
}
Also used : Externalizer(org.infinispan.commons.marshall.Externalizer) LambdaExternalizer(org.infinispan.commons.marshall.LambdaExternalizer) GlobalMarshaller(org.infinispan.marshall.core.GlobalMarshaller) LambdaExternalizer(org.infinispan.commons.marshall.LambdaExternalizer) SerializeFunctionWith(org.infinispan.commons.marshall.SerializeFunctionWith)

Aggregations

Externalizer (org.infinispan.commons.marshall.Externalizer)1 LambdaExternalizer (org.infinispan.commons.marshall.LambdaExternalizer)1 SerializeFunctionWith (org.infinispan.commons.marshall.SerializeFunctionWith)1 GlobalMarshaller (org.infinispan.marshall.core.GlobalMarshaller)1