
org.cache2k.configuration.CacheConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cache2k-api Show documentation
Show all versions of cache2k-api Show documentation
A light weight and high performance Java cache library. API only jar.
package org.cache2k.configuration;
/*
* #%L
* cache2k API
* %%
* Copyright (C) 2000 - 2016 headissue GmbH, Munich
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.cache2k.Cache2kBuilder;
import org.cache2k.customization.*;
import org.cache2k.event.CacheEntryOperationListener;
import org.cache2k.integration.AdvancedCacheLoader;
import org.cache2k.integration.CacheLoader;
import org.cache2k.integration.CacheWriter;
import org.cache2k.integration.ExceptionPropagator;
import org.cache2k.integration.ResiliencePolicy;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
/**
* Cache configuration. Adheres to bean standard.
*
* @author Jens Wilke; created: 2013-06-25
*/
public class CacheConfiguration implements Serializable {
public final long EXPIRY_MILLIS_ETERNAL = Long.MAX_VALUE;
private boolean storeByReference;
private String name;
private CacheTypeDescriptor keyType;
private CacheTypeDescriptor valueType;
private Class> implementation;
private long entryCapacity = 2000;
private int heapEntryCapacity = -1;
private boolean refreshAhead = false;
private long expireAfterWriteMillis = -1;
private long retryIntervalMillis = -1;
private long maxRetryIntervalMillis = -1;
private long resilienceDurationMillis = -1;
private boolean keepDataAfterExpired = true;
private boolean sharpExpiry = false;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy