Implement java.io.Flushable wherever applicable
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.transaction;
|
||||
|
||||
import java.io.Flushable;
|
||||
|
||||
/**
|
||||
* Representation of the status of a transaction.
|
||||
*
|
||||
@@ -34,7 +36,7 @@ package org.springframework.transaction;
|
||||
* @see org.springframework.transaction.support.TransactionCallback#doInTransaction
|
||||
* @see org.springframework.transaction.interceptor.TransactionInterceptor#currentTransactionStatus()
|
||||
*/
|
||||
public interface TransactionStatus extends SavepointManager {
|
||||
public interface TransactionStatus extends SavepointManager, Flushable {
|
||||
|
||||
/**
|
||||
* Return whether the present transaction is new (else participating
|
||||
@@ -79,6 +81,7 @@ public interface TransactionStatus extends SavepointManager {
|
||||
* Flush the underlying session to the datastore, if applicable:
|
||||
* for example, all affected Hibernate/JPA sessions.
|
||||
*/
|
||||
@Override
|
||||
void flush();
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.transaction.support;
|
||||
|
||||
import java.io.Flushable;
|
||||
|
||||
/**
|
||||
* Interface to be implemented by transaction objects that are able to
|
||||
* return an internal rollback-only marker, typically from a another
|
||||
@@ -29,7 +31,7 @@ package org.springframework.transaction.support;
|
||||
* @since 1.1
|
||||
* @see DefaultTransactionStatus#isRollbackOnly
|
||||
*/
|
||||
public interface SmartTransactionObject {
|
||||
public interface SmartTransactionObject extends Flushable {
|
||||
|
||||
/**
|
||||
* Return whether the transaction is internally marked as rollback-only.
|
||||
@@ -43,6 +45,7 @@ public interface SmartTransactionObject {
|
||||
* Flush the underlying sessions to the datastore, if applicable:
|
||||
* for example, all affected Hibernate/JPA sessions.
|
||||
*/
|
||||
@Override
|
||||
void flush();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.transaction.support;
|
||||
|
||||
import java.io.Flushable;
|
||||
|
||||
/**
|
||||
* Interface for transaction synchronization callbacks.
|
||||
* Supported by AbstractPlatformTransactionManager.
|
||||
@@ -34,7 +36,7 @@ package org.springframework.transaction.support;
|
||||
* @see org.springframework.jdbc.datasource.DataSourceUtils#CONNECTION_SYNCHRONIZATION_ORDER
|
||||
* @see org.springframework.orm.hibernate3.SessionFactoryUtils#SESSION_SYNCHRONIZATION_ORDER
|
||||
*/
|
||||
public interface TransactionSynchronization {
|
||||
public interface TransactionSynchronization extends Flushable {
|
||||
|
||||
/** Completion status in case of proper commit */
|
||||
int STATUS_COMMITTED = 0;
|
||||
@@ -65,6 +67,7 @@ public interface TransactionSynchronization {
|
||||
* for example, a Hibernate/JPA session.
|
||||
* @see org.springframework.transaction.TransactionStatus#flush()
|
||||
*/
|
||||
@Override
|
||||
void flush();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user