Refactor caches (#2775)
* added static usage of cache in order access it easier * added mandatory (in hawkbit-core) registration - always tenant aware caches shall be used - hawkbit depends on it * added per cache and tenant name configuration * (not really realted to caches) but in order to be easier evicted entities after commit handlers are now statically accessed Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -28,7 +28,7 @@ import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.helper.AfterTransactionCommitExecutorHolder;
|
||||
import org.eclipse.hawkbit.repository.jpa.executor.AfterTransactionCommitExecutor;
|
||||
import org.eclipse.hawkbit.repository.model.BaseEntity;
|
||||
import org.eclipse.hawkbit.tenancy.TenantAwareAuthenticationDetails;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
@@ -199,7 +199,7 @@ public abstract class AbstractJpaBaseEntity implements BaseEntity {
|
||||
|
||||
protected static void doNotify(final Runnable runnable) {
|
||||
// fire events onl AFTER transaction commit
|
||||
AfterTransactionCommitExecutorHolder.getInstance().getAfterCommit().afterCommit(runnable);
|
||||
AfterTransactionCommitExecutor.afterCommit(runnable);
|
||||
}
|
||||
|
||||
protected boolean isController() {
|
||||
|
||||
Reference in New Issue
Block a user