mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 20:24:46 +00:00
HHH-16124 Remove deprecated method CacheTransactionSynchronization#getCurrentTransactionStartTimestamp
This commit is contained in:
parent
cc42864351
commit
b1030044f5
@ -18,11 +18,6 @@ private NoCachingTransactionSynchronizationImpl() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCurrentTransactionStartTimestamp() {
|
||||
return getCachingTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCachingTimestamp() {
|
||||
throw new UnsupportedOperationException("Method not supported when 2LC is not enabled");
|
||||
|
@ -20,12 +20,6 @@ public AbstractCacheTransactionSynchronization(RegionFactory regionFactory) {
|
||||
this.regionFactory = regionFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(forRemoval = true)
|
||||
public long getCurrentTransactionStartTimestamp() {
|
||||
return lastTransactionCompletionTimestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCachingTimestamp() {
|
||||
return lastTransactionCompletionTimestamp;
|
||||
|
@ -38,24 +38,6 @@
|
||||
* @author Radim Vansa
|
||||
*/
|
||||
public interface CacheTransactionSynchronization {
|
||||
|
||||
/**
|
||||
* What is the start time of this context object?
|
||||
*
|
||||
* @apiNote If not currently joined to a transaction, the timestamp from
|
||||
* the last transaction is safe to use. If not ever/yet joined to a
|
||||
* transaction, a timestamp at the time the Session/CacheTransactionSynchronization
|
||||
* were created should be returned.
|
||||
*
|
||||
* @implSpec This "timestamp" need not be related to timestamp in the Java
|
||||
* Date/millisecond sense. It just needs to be an incrementing value.
|
||||
*
|
||||
* @deprecated Use {@link CacheTransactionSynchronization#getCachingTimestamp()} instead.
|
||||
* Please do implement also getCachingTimestamp, as its default implementation will be removed.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
long getCurrentTransactionStartTimestamp();
|
||||
|
||||
/**
|
||||
* What is the start time of this context object?
|
||||
*
|
||||
@ -69,9 +51,7 @@ public interface CacheTransactionSynchronization {
|
||||
*
|
||||
* An UnsupportedOperationException is thrown if 2LC has not enabled
|
||||
*/
|
||||
default long getCachingTimestamp() {
|
||||
return getCurrentTransactionStartTimestamp();
|
||||
}
|
||||
long getCachingTimestamp();
|
||||
|
||||
/**
|
||||
* Callback that owning Session has become joined to a resource transaction.
|
||||
|
@ -258,12 +258,6 @@ public void markForRollbackOnly() {
|
||||
delegate.markForRollbackOnly();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(forRemoval = true)
|
||||
public long getTransactionStartTimestamp() {
|
||||
return delegate.getTransactionStartTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlushModeType getFlushMode() {
|
||||
return delegate.getFlushMode();
|
||||
|
@ -208,18 +208,6 @@ default void checkOpen() {
|
||||
*/
|
||||
void markForRollbackOnly();
|
||||
|
||||
/**
|
||||
* A "timestamp" at or before the start of the current transaction.
|
||||
*
|
||||
* @apiNote This "timestamp" need not be related to timestamp in the Java Date/millisecond
|
||||
* sense. It just needs to be an incrementing value. See
|
||||
* {@link CacheTransactionSynchronization#getCurrentTransactionStartTimestamp()}
|
||||
*
|
||||
* @deprecated no longer supported, will be removed soon.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
long getTransactionStartTimestamp();
|
||||
|
||||
/**
|
||||
* The current {@link CacheTransactionSynchronization} associated
|
||||
* with this session. This may be {@code null} if the session is not
|
||||
|
@ -364,11 +364,6 @@ public void markForRollbackOnly() {
|
||||
delegate.markForRollbackOnly();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTransactionStartTimestamp() {
|
||||
return delegate.getTransactionStartTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheTransactionSynchronization getCacheTransactionSynchronization() {
|
||||
return delegate.getCacheTransactionSynchronization();
|
||||
|
@ -513,15 +513,6 @@ public CacheTransactionSynchronization getCacheTransactionSynchronization() {
|
||||
return cacheTransactionSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This will be removed.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(forRemoval = true)
|
||||
public long getTransactionStartTimestamp() {
|
||||
return getCacheTransactionSynchronization().getCachingTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Transaction beginTransaction() {
|
||||
checkOpen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user