org.hibernate.cache.infinispan.access.Synchronization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-infinispan
Show all versions of hibernate-infinispan
A module of the Hibernate Core project
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.cache.infinispan.access;
import java.util.UUID;
/**
* Synchronization that should release the locks after invalidation is complete.
*
* @author Radim Vansa <[email protected]>
*/
public class Synchronization implements javax.transaction.Synchronization {
public final UUID uuid = UUID.randomUUID();
private final NonTxPutFromLoadInterceptor nonTxPutFromLoadInterceptor;
private final Object[] keys;
public Synchronization(NonTxPutFromLoadInterceptor nonTxPutFromLoadInterceptor, Object[] keys) {
this.nonTxPutFromLoadInterceptor = nonTxPutFromLoadInterceptor;
this.keys = keys;
}
@Override
public void beforeCompletion() {}
@Override
public void afterCompletion(int status) {
nonTxPutFromLoadInterceptor.broadcastEndInvalidationCommand(keys, uuid);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy