All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gemstone.gemfire.cache.EntryOperation Maven / Gradle / Ivy

Go to download

Apache Geode (incubating) provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing

The newest version!
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.gemstone.gemfire.cache;

/**
 * Gemfire Context passed to PartitionResolver to compute the
 * data location
 * 
 * @author Yogesh Mahajan
 * @author Mitch Thomas
 * 
 * @see PartitionResolver  
 * @since 6.0 
 */
public interface EntryOperation {

  /** 
   * Returns the region to which this cached object belongs or
   * the region that raised this event for RegionEvents.
   * @return the region associated with this object or the region that raised
   * this event.
   */
  public Region getRegion();

  /**
   * Return a description of the operation that triggered this event.
   * It may return null and should not be used to generate routing object
   * in {@link PartitionResolver#getRoutingObject(EntryOperation)}
   * @return the operation that triggered this event.
   * @since 6.0
   * @deprecated
   */
  public Operation getOperation();

  /** 
   * Returns the key.
   * @return the key
   */
  public K getKey();

  /** Returns the callbackArgument passed to the method that generated this event.
   * Provided primarily in case this object or region has already been
   * destroyed. See the {@link Region} interface methods that take a
   * callbackArgument parameter.
   * Only fields on the key should be used when creating the routing object.
   * @return the callbackArgument associated with this event. null
   * is returned if the callback argument is not propagated to the event.
   * This happens for events given to {@link TransactionListener}
   * and to {@link CacheListener} on the remote side of a transaction commit.
   */
  public Object getCallbackArgument();

  /**
   * Returns true if the callback argument is "available".
   * Not available means that the callback argument may have existed but it could
   * not be obtained.
   * Note that {@link #getCallbackArgument} will return null
   * when this method returns false.
   * @since 6.0
   */
  public boolean isCallbackArgumentAvailable();
  
  /**
   * Returns the value but may return null and should not be used to generate 
   * routing object in {@link PartitionResolver#getRoutingObject(EntryOperation)}.
   *  Only fields on the key should be used when creating the routing object.
   * @return the value.
   * @deprecated
   */
  public V getNewValue();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy