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

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

There is a newer version: 2.0-BETA
Show 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.cache;

import java.util.*;

/**
 * Indicates that an attempt to notify required participants of a transaction 
 * involving one or more regions that are configured with {@link 
 * MembershipAttributes} may have failed. The commit itself was completed but
 * one or more regions affected by the transaction have one or more required
 * roles that were not successfully notified. Failure may be caused by 
 * departure of one or more required roles while sending the operation to
 * them. This exception will contain one {@link RegionDistributionException}
 * for every region that had a reliability failure. Details of the failed
 * {@link MembershipAttributes#getRequiredRoles required roles} are provided
 *  in each RegionDistributionException.
 *
 * @author Kirk Lund
 * @since 5.0
 * 
 * @deprecated as of 7.0, this exception is no longer thrown
 */
@Deprecated
public class CommitDistributionException extends TransactionException {
  private static final long serialVersionUID = -3517820638706581823L;
  /** 
   * The RegionDistributionExceptions for every region that had a reliability
   * failure during distribution of the operation.
   */
  private Set regionDistributionExceptions = Collections.EMPTY_SET;
  
  /** 
   * Constructs a CommitDistributionException with a message.
   *
   * @param s the String message
   */
  @Deprecated
  public CommitDistributionException(String s) {
    super(s);
  }
  
  /** 
   * Constructs a CommitDistributionException with a message and
   * a cause.
   *
   * @param s the String message
   * @param regionDistributionExceptions set of RegionDistributionExceptions
   * for each region that had a reliability failure
   */
  @Deprecated
  public CommitDistributionException(String s, Set regionDistributionExceptions) {
    super(s);
    this.regionDistributionExceptions = regionDistributionExceptions;
    if (this.regionDistributionExceptions == null) {
      this.regionDistributionExceptions = Collections.EMPTY_SET;
    }
  }
  
  /** 
   * Returns set of RegionDistributionExceptions for each region that had a 
   * reliability failure during distribution of the operation.
   *
   * @return set of RegionDistributionExceptions for each region that had a 
   * reliability failure during distribution of the operation
   */
  @Deprecated
  public Set getRegionDistributionExceptions() {
    return this.regionDistributionExceptions;
  }
  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy