com.tangosol.util.extractor.AbstractUpdater Maven / Gradle / Ivy
Show all versions of coherence Show documentation
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.util.extractor;
import com.tangosol.util.ExternalizableHelper;
import com.tangosol.util.InvocableMap;
import com.tangosol.util.ValueUpdater;
import java.io.Serializable;
import java.util.Map;
/**
* Abstract base for ValueUpdater implementations.
*
* Starting with Coherence 3.6, when used to update information stored in a Map,
* subclasses have the additional ability to operate against the Map.Entry
* instead of just the value. This allows an updater implementation to update a
* desired value using all available information on the corresponding Map.Entry
* object and is intended to be used in advanced custom scenarios, when
* application code needs to look at both key and value at the same time or can
* make some very specific assumptions regarding to the implementation details of
* the underlying Entry object (e.g. {@link com.tangosol.util.BinaryEntry}).
* To maintain full backwards compatibility, the default behavior remains to
* update the Value property of the Map.Entry.
*
* Note: subclasses are responsible for POF and/or Lite serialization of
* the updater.
*
* @author gg 2009.09.11
* @since Coherence 3.6
*/
public abstract class AbstractUpdater
extends ExternalizableHelper
implements ValueUpdater