com.hazelcast.config.QueryCacheConfigReadOnly Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hazelcast-all Show documentation
Show all versions of hazelcast-all Show documentation
Kubernetes Service Discovery for Hazelcast Discovery SPI
/*
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
*
* 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.
*/
package com.hazelcast.config;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Read only {@code QueryCacheConfig}
*
* @since 3.5
* @deprecated this class will be removed in 4.0; it is meant for internal usage only.
*/
class QueryCacheConfigReadOnly extends QueryCacheConfig {
public QueryCacheConfigReadOnly(QueryCacheConfig other) {
super(other);
}
@Override
public List getIndexConfigs() {
List mapIndexConfigs = super.getIndexConfigs();
List readOnlyMapIndexConfigs = new ArrayList(mapIndexConfigs.size());
for (MapIndexConfig mapIndexConfig : mapIndexConfigs) {
readOnlyMapIndexConfigs.add(mapIndexConfig.getAsReadOnly());
}
return Collections.unmodifiableList(readOnlyMapIndexConfigs);
}
@Override
public List getEntryListenerConfigs() {
List listenerConfigs = super.getEntryListenerConfigs();
List readOnlyListenerConfigs = new ArrayList(listenerConfigs.size());
for (EntryListenerConfig listenerConfig : listenerConfigs) {
readOnlyListenerConfigs.add(listenerConfig.getAsReadOnly());
}
return Collections.unmodifiableList(readOnlyListenerConfigs);
}
@Override
public EvictionConfig getEvictionConfig() {
return super.getEvictionConfig().getAsReadOnly();
}
@Override
public PredicateConfig getPredicateConfig() {
return super.getPredicateConfig().getAsReadOnly();
}
@Override
public QueryCacheConfig setBatchSize(int batchSize) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setBufferSize(int bufferSize) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setDelaySeconds(int delaySeconds) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setEntryListenerConfigs(List listenerConfigs) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setEvictionConfig(EvictionConfig evictionConfig) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setIncludeValue(boolean includeValue) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setIndexConfigs(List indexConfigs) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setInMemoryFormat(InMemoryFormat inMemoryFormat) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setName(String name) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setPredicateConfig(PredicateConfig predicateConfig) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setPopulate(boolean populate) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
@Override
public QueryCacheConfig setCoalesce(boolean coalesce) {
throw new UnsupportedOperationException("This config is read-only query cache: " + getName());
}
}