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

com.gemstone.gemfire.internal.cache.execute.InternalRegionFunctionContext Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved.
 *
 * Licensed 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. See accompanying
 * LICENSE file.
 */

package com.gemstone.gemfire.internal.cache.execute;

import java.util.Map;
import java.util.Set;

import com.gemstone.gemfire.cache.PartitionAttributesFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.internal.cache.LocalDataSet;

/**
 * Internal interface used to provide for some essential functionality for
 * {@link RegionFunctionContext} invoked by {@link PartitionRegionHelper}.
 * GemFireXD provides its own implementation when using function messages
 * instead of {@link Function}s so {@link PartitionRegionHelper} should not
 * depend on casting to {@link RegionFunctionContextImpl} directly rather should
 * use this interface.
 * 
 * @author swale
 */
public interface InternalRegionFunctionContext extends RegionFunctionContext {

  /**
   * Return a region providing read access limited to the local data set
   * corresponding to the routing keys as specified by the {@link #getFilter()}
   * method of the function context for the given partitioned region.
   * 

* Writes using this Region have no constraints and behave the same as the * partitioned region. * * @param r * region to get the local data set for * * @return a region for efficient reads or null if the region is not a * partitioned region */ public Region getLocalDataSet(Region r); /** * Return a map of {@link PartitionAttributesFactory#setColocatedWith(String)} * colocated Regions with read access limited to the routing keys as specified * by the {@link #getFilter()} method of the function context. *

* Writes using these Region have no constraints and behave the same as a * partitioned Region. *

* If there are no colocated regions, return an empty map. * * @return an unmodifiable map of {@linkplain Region#getFullPath() region * name} to {@link Region} */ public Map getColocatedLocalDataSets(); /** * Get the set of bucket IDs for this node as specified by the * {@link #getFilter()} method of the function context for the given region. * * @param region * region to get the local bucket IDs for * * @return the set of bucket IDs for this node in this function context for * the given region */ public Set getLocalBucketSet(Region region); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy