@SerializeWith(RemoveAllUserLoginFailuresEvent.ExternalizerImpl.class) public class RemoveAllUserLoginFailuresEvent extends SessionClusterEvent {
@SerializeWith(RealmRemovedSessionEvent.ExternalizerImpl.class) public class RealmRemovedSessionEvent extends SessionClusterEvent {
@SerializeWith(RemoveUserSessionsEvent.ExternalizerImpl.class) public class RemoveUserSessionsEvent extends SessionClusterEvent {
/** * Class used to allow for remote clients to essentially ignore the value by returning an empty byte[]. */ @SerializeWith(value = ToEmptyBytesKeyValueFilterConverter.ToEmptyBytesKeyValueFilterConverterExternalizer.class) static class ToEmptyBytesKeyValueFilterConverter extends AbstractKeyValueFilterConverter { private ToEmptyBytesKeyValueFilterConverter() { } public static ToEmptyBytesKeyValueFilterConverter INSTANCE = new ToEmptyBytesKeyValueFilterConverter(); static final byte[] bytes = Util.EMPTY_BYTE_ARRAY; @Override public Object filterAndConvert(Object key, Object value, Metadata metadata) { return bytes; } @Override public MediaType format() { return null; } public static final class ToEmptyBytesKeyValueFilterConverterExternalizer implements Externalizer<ToEmptyBytesKeyValueFilterConverter> { @Override public void writeObject(ObjectOutput output, ToEmptyBytesKeyValueFilterConverter object) { } @Override public ToEmptyBytesKeyValueFilterConverter readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(LastSessionRefreshEvent.ExternalizerImpl.class) public class LastSessionRefreshEvent implements ClusterEvent {
@SerializeWith(value = SetStringConstant.Externalizer0.class) private static final class SetStringConstant<K> implements Consumer<WriteEntryView<K, String>> { @Override public void accept(WriteEntryView<K, String> wo) { wo.set("one"); } private static final SetStringConstant INSTANCE = new SetStringConstant(); public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(value = SetFirstArgValueProcessor.Externalizer0.class) private static final class SetFirstArgValueProcessor<K> implements EntryProcessor<K, String, Void> { @Override public Void process(MutableEntry<K, String> entry, Object... args) throws EntryProcessorException { entry.setValue((String) args[0]); return null; } private static final SetFirstArgValueProcessor INSTANCE = new SetFirstArgValueProcessor<>(); @SuppressWarnings("unchecked") private static <K> SetFirstArgValueProcessor<K> getInstance() { return INSTANCE; } public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(value = RemoveProcessor.Externalizer0.class) private static final class RemoveProcessor<K, V> implements EntryProcessor<K, V, Void> { @Override public Void process(MutableEntry<K, V> entry, Object... args) throws EntryProcessorException { entry.remove(); return null; } private static final RemoveProcessor INSTANCE = new RemoveProcessor<>(); @SuppressWarnings("unchecked") private static <K, V> RemoveProcessor<K, V> getInstance() { return INSTANCE; } public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(value = GetValueProcessor.Externalizer0.class) private static final class GetValueProcessor<K, V> implements EntryProcessor<K, V, V> { @Override public V process(MutableEntry<K, V> entry, Object... args) throws EntryProcessorException { return entry.getValue(); } private static final GetValueProcessor INSTANCE = new GetValueProcessor<>(); @SuppressWarnings("unchecked") private static <K, V> GetValueProcessor<K, V> getInstance() { return INSTANCE; } public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(PojoAnnotated.Externalizer.class) public static class PojoAnnotated extends Pojo { public PojoAnnotated(int i, boolean b) { super(i, b); } public static class Externalizer implements org.infinispan.commons.marshall.Externalizer<PojoAnnotated> { @Override public void writeObject(ObjectOutput output, PojoAnnotated object) throws IOException { output.writeInt(object.i); output.writeBoolean(object.b); } @Override public PojoAnnotated readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new PojoAnnotated(input.readInt(), input.readBoolean()); } } }
@SerializeWith(value = SetValueAndConstantLifespan.Externalizer0.class) private static final class SetValueAndConstantLifespan<K, V> implements BiConsumer<V, WriteEntryView<K, V>> { @Override public void accept(V v, WriteEntryView<K, V> wo) { wo.set(v, new MetaLifespan(100000)); } @SuppressWarnings("unchecked") private static <K, V> SetValueAndConstantLifespan<K, V> getInstance() { return INSTANCE; } private static final SetValueAndConstantLifespan INSTANCE = new SetValueAndConstantLifespan<>(); public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(value = SetArgsValuesProcessor.Externalizer0.class) private static final class SetArgsValuesProcessor<K> implements EntryProcessor<K, String, Void> { @Override public Void process(MutableEntry<K, String> entry, Object... args) throws EntryProcessorException { Map<K, String> data = (Map<K, String>) args[0]; entry.setValue(data.get(entry.getKey())); return null; } private static final SetArgsValuesProcessor INSTANCE = new SetArgsValuesProcessor<>(); @SuppressWarnings("unchecked") private static <K> SetArgsValuesProcessor<K> getInstance() { return INSTANCE; } public static final class Externalizer0 implements Externalizer<Object> { public void writeObject(ObjectOutput oo, Object o) {} public Object readObject(ObjectInput input) { return INSTANCE; } } }
@SerializeWith(MyBaseControlledConsistentHashFactory.Ext.class) private static class MyBaseControlledConsistentHashFactory extends BaseControlledConsistentHashFactory<DefaultConsistentHash> { public MyBaseControlledConsistentHashFactory() { super(new DefaultTrait(), 1); } @Override protected int[][] assignOwners(int numSegments, int numOwners, List<Address> members) { return new int[][]{{members.size() - 1}}; } public static final class Ext implements Externalizer<MyBaseControlledConsistentHashFactory> { @Override public void writeObject(ObjectOutput output, MyBaseControlledConsistentHashFactory object) { // No-op } @Override public MyBaseControlledConsistentHashFactory readObject(ObjectInput input) { return new MyBaseControlledConsistentHashFactory(); } } } }
@SerializeWith(value = SetConstantOnWriteOnly.Externalizer0.class) public static final class SetConstantOnWriteOnly<K> implements Consumer<WriteEntryView<K, String>> { final String constant; public SetConstantOnWriteOnly(String constant) { this.constant = constant; } @Override public void accept(WriteEntryView<K, String> wo) { wo.set(constant); } public static final class Externalizer0 implements Externalizer<SetConstantOnWriteOnly> { @Override public void writeObject(ObjectOutput output, SetConstantOnWriteOnly object) throws IOException { output.writeUTF(object.constant); } @Override public SetConstantOnWriteOnly readObject(ObjectInput input) throws IOException, ClassNotFoundException { String constant = input.readUTF(); return new SetConstantOnWriteOnly(constant); } } }
@SerializeWith(SampleEntity.SampleEntityExternalizer.class) public class SampleEntity {
@SerializeWith(value = InvokeFunction.Externalizer0.class) private static final class InvokeFunction<K, V, T> implements Function<ReadWriteEntryView<K, V>, T> { private final EntryProcessor<K, V, T> entryProcessor; private final Object[] arguments; private InvokeFunction(EntryProcessor<K, V, T> entryProcessor, Object[] arguments) { this.entryProcessor = entryProcessor; this.arguments = arguments; } @Override public T apply(ReadWriteEntryView<K, V> rw) { return entryProcessor.process(new ReadWriteMutableEntry<>(rw), arguments); } public static final class Externalizer0 implements Externalizer<InvokeFunction<?, ?, ?>> { public void writeObject(ObjectOutput oo, InvokeFunction<?, ?, ?> o) throws IOException { oo.writeObject(o.entryProcessor); oo.writeInt(o.arguments.length); for (Object argument : o.arguments) oo.writeObject(argument); } public InvokeFunction<?, ?, ?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { EntryProcessor<?, ?, ?> entryProcessor = (EntryProcessor<?, ?, ?>) input.readObject(); int length = input.readInt(); Object[] arguments = new Object[length]; for (int i = 0; i < length; i++) arguments[i] = input.readObject(); return new InvokeFunction<>(entryProcessor, arguments); } } }
@SerializeWith(EntryProcessorResultWithKey.Externalizer0.class) private static final class EntryProcessorResultWithKey<K, T> implements EntryProcessorResult<T> { final K key; final T t; public EntryProcessorResultWithKey(K key, T t) { this.key = key; this.t = t; } @Override public T get() throws EntryProcessorException { return t; } public static final class Externalizer0 implements Externalizer<EntryProcessorResultWithKey<?, ?>> { @Override public void writeObject(ObjectOutput oo, EntryProcessorResultWithKey<?, ?> o) throws IOException { oo.writeObject(o.key); oo.writeObject(o.t); } @Override public EntryProcessorResultWithKey<?, ?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { Object key = input.readObject(); Object t = input.readObject(); return new EntryProcessorResultWithKey<>(key, t); } } }
@SerializeWith(value = InvokeAllFunction.Externalizer0.class) private static final class InvokeAllFunction<K, V, T> implements Function<ReadWriteEntryView<K, V>, EntryProcessorResultWithKey<K, T>> { private final EntryProcessor<K, V, T> entryProcessor; private final Object[] arguments; private InvokeAllFunction(EntryProcessor<K, V, T> entryProcessor, Object[] arguments) { this.entryProcessor = entryProcessor; this.arguments = arguments; } @Override public EntryProcessorResultWithKey<K, T> apply(ReadWriteEntryView<K, V> rw) { T res = entryProcessor.process(new ReadWriteMutableEntry<>(rw), arguments); return new EntryProcessorResultWithKey<>(rw.key(), res); } public static final class Externalizer0 implements Externalizer<InvokeAllFunction<?, ?, ?>> { public void writeObject(ObjectOutput oo, InvokeAllFunction<?, ?, ?> o) throws IOException { oo.writeObject(o.entryProcessor); oo.writeInt(o.arguments.length); for (Object argument : o.arguments) oo.writeObject(argument); } public InvokeAllFunction<?, ?, ?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { EntryProcessor<?, ?, ?> entryProcessor = (EntryProcessor<?, ?, ?>) input.readObject(); int length = input.readInt(); Object[] arguments = new Object[length]; for (int i = 0; i < length; i++) arguments[i] = input.readObject(); return new InvokeAllFunction<>(entryProcessor, arguments); } } }
@SerializeWith(value = SetConstantOnReadWrite.Externalizer0.class) public static final class SetConstantOnReadWrite<K> implements Function<ReadWriteEntryView<K, String>, Void> { final String constant; public SetConstantOnReadWrite(String constant) { this.constant = constant; } @Override public Void apply(ReadWriteEntryView<K, String> rw) { rw.set(constant); return null; } public static final class Externalizer0 implements Externalizer<SetConstantOnReadWrite<?>> { @Override public void writeObject(ObjectOutput output, SetConstantOnReadWrite<?> object) throws IOException { output.writeUTF(object.constant); } @Override public SetConstantOnReadWrite<?> readObject(ObjectInput input) throws IOException, ClassNotFoundException { String constant = input.readUTF(); return new SetConstantOnReadWrite<>(constant); } } }
@SerializeWith(Summary.SummaryExternalizer.class) public class Summary {