HHH-16124 Remove deprecated method CacheTransactionSynchronization#getCurrentTransactionStartTimestamp

This commit is contained in:
Sanne Grinovero 2023-01-31 16:28:18 +00:00 committed by Sanne Grinovero
parent cc42864351
commit b1030044f5
7 changed files with 1 additions and 64 deletions

View File

@ -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");

View File

@ -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;

View File

@ -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.

View File

@ -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();

View File

@ -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

View File

@ -364,11 +364,6 @@ public void markForRollbackOnly() {
delegate.markForRollbackOnly();
}
@Override
public long getTransactionStartTimestamp() {
return delegate.getTransactionStartTimestamp();
}
@Override
public CacheTransactionSynchronization getCacheTransactionSynchronization() {
return delegate.getCacheTransactionSynchronization();

View File

@ -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();