Class SynchronizedDecoratorMarshaller<T>

  • All Implemented Interfaces:
    Function<T,​T>, org.infinispan.protostream.BaseMarshaller<T>, org.infinispan.protostream.ProtobufTagMarshaller<T>, Marshallable<T>, ProtoStreamMarshaller<T>, org.wildfly.security.ParametricPrivilegedAction<T,​T>

    public class SynchronizedDecoratorMarshaller<T>
    extends DecoratorMarshaller<T>
    A decorator marshaller that writes the decorated object while holding its monitor lock. e.g. to enable iteration over a decorated collection without the risk of a ConcurrentModificationException.
    Author:
    Paul Ferraro
    • Constructor Detail

      • SynchronizedDecoratorMarshaller

        public SynchronizedDecoratorMarshaller​(Class<T> decoratedClass,
                                               UnaryOperator<T> decorator,
                                               T sample)
        Constructs a decorator marshaller.
        Parameters:
        decoratedClass - the generalized type of the decorated object
        decorator - the decoration function
        sample - a sample object used to determine the type of the decorated object