org.hibernate.cache.infinispan.util.LifecycleCallbacks 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.util;
import org.infinispan.commons.marshall.AdvancedExternalizer;
import org.infinispan.configuration.global.GlobalConfiguration;
import org.infinispan.factories.GlobalComponentRegistry;
import org.infinispan.lifecycle.AbstractModuleLifecycle;
import java.util.Map;
public class LifecycleCallbacks extends AbstractModuleLifecycle {
@Override
public void cacheManagerStarting(GlobalComponentRegistry gcr, GlobalConfiguration globalCfg) {
Map> externalizerMap = globalCfg.serialization().advancedExternalizers();
externalizerMap.put( Externalizers.UUID, new Externalizers.UUIDExternalizer() );
externalizerMap.put( Externalizers.TOMBSTONE, new Tombstone.Externalizer() );
externalizerMap.put( Externalizers.EXCLUDE_TOMBSTONES_FILTER, new Tombstone.ExcludeTombstonesFilterExternalizer() );
externalizerMap.put( Externalizers.TOMBSTONE_UPDATE, new TombstoneUpdate.Externalizer() );
externalizerMap.put( Externalizers.FUTURE_UPDATE, new FutureUpdate.Externalizer() );
externalizerMap.put( Externalizers.VALUE_EXTRACTOR, new FutureUpdate.ValueExtractorExternalizer() );
externalizerMap.put( Externalizers.VERSIONED_ENTRY, new VersionedEntry.Externalizer() );
externalizerMap.put( Externalizers.EXCLUDE_EMPTY_EXTRACT_VALUE, new VersionedEntry.ExcludeEmptyExtractValueExternalizer() );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy