use of org.infinispan.eviction.impl.ActivationManagerStub in project infinispan by infinispan.
the class DataContainerStressTest method initializeDefaultDataContainer.
private void initializeDefaultDataContainer(DefaultDataContainer dc) {
InternalEntryFactoryImpl entryFactory = new InternalEntryFactoryImpl();
TimeService timeService = new EmbeddedTimeService();
TestingUtil.inject(entryFactory, timeService);
// Mockito cannot be used as it will run out of memory from keeping all the invocations, thus we use blank impls
TestingUtil.inject(dc, (EvictionManager) (evicted, cmd) -> CompletableFutures.completedNull(), new PassivationManagerStub(), entryFactory, new ActivationManagerStub(), null, timeService, null, new InternalExpirationManager() {
@Override
public void processExpiration() {
}
@Override
public boolean isEnabled() {
return false;
}
@Override
public CompletableFuture<Boolean> entryExpiredInMemory(InternalCacheEntry entry, long currentTime, boolean writeOperation) {
return null;
}
@Override
public CompletionStage<Void> handleInStoreExpirationInternal(Object key) {
return null;
}
@Override
public CompletionStage<Void> handleInStoreExpirationInternal(MarshallableEntry marshalledEntry) {
return null;
}
@Override
public CompletionStage<Boolean> handlePossibleExpiration(InternalCacheEntry entry, int segment, boolean isWrite) {
return null;
}
@Override
public void addInternalListener(ExpirationConsumer consumer) {
}
@Override
public void removeInternalListener(Object listener) {
}
});
}
Aggregations