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

com.gemstone.gemfire.cache.TransactionListener 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.cache;

/**
 * 

A listener that can be implemented to handle transaction related * events. The methods on TransactionListener are * invoked synchronously after the operation, commit or rollback, * completes. The transaction that causes the listener to be called * will no longer exist at the time the listener code executes. The * thread that performed the transaction operation will not see that * operation complete until the listener method completes its * execution. * *

Multiple transactions, on the same cache, can cause concurrent * invocation of TransactionListener methods. Any * exceptions thrown by the listener are caught and logged. * *

Rollback and failed commit operations are local. * * @author Darrel Schneider * * @see CacheTransactionManager#setListener * @see CacheTransactionManager#getListener * @since 4.0 */ public interface TransactionListener extends CacheCallback { /** Called after a successful commit of a transaction. * * @param event the TransactionEvent * @see CacheTransactionManager#commit */ public void afterCommit(TransactionEvent event); /** Called after an unsuccessful commit operation. * * @param event the TransactionEvent * @see CacheTransactionManager#commit */ public void afterFailedCommit(TransactionEvent event); /** Called after an explicit rollback of a transaction. * * @param event the TransactionEvent * @see CacheTransactionManager#rollback * @see CacheTransactionManager#commit */ public void afterRollback(TransactionEvent event); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy