
com.alachisoft.ncache.client.datastructures.Notifiable Maven / Gradle / Ivy
package com.alachisoft.ncache.client.datastructures;
// Copyright (c) 2020 Alachisoft
//
// 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
import com.alachisoft.ncache.runtime.events.DataStructureDataChangeListener;
import com.alachisoft.ncache.runtime.events.DataTypeEventDataFilter;
import com.alachisoft.ncache.runtime.events.EventType;
import com.alachisoft.ncache.runtime.exceptions.CacheException;
import java.util.EnumSet;
/**
* This interface contains methods for registering and unregistering notifactions for data structures.
*/
public interface Notifiable {
/**
* Allows you to register collection event notifications like Add, Update, and Remove on the collection.
* @param collectionDataNotificationListener The listeber that is invoked when an item is added, updated or removed from the cache.
* @param eventTypes The event type/types that are to be registered.
* @param datafilter An enum which allows you to specify to which extent you want the data with the event.
* @throws CacheException
*/
void addChangeListener(DataStructureDataChangeListener collectionDataNotificationListener, EnumSet eventTypes, DataTypeEventDataFilter datafilter) throws CacheException;
/**
* Allows you to unregister collection event notification.
* @param collectionDataNotificationListener The listener that was registered with collection changed notification.
* @param eventTypes The event type/types that are to be unregistered.
* @throws Exception
*/
void removeChangeListener(DataStructureDataChangeListener collectionDataNotificationListener, EnumSet eventTypes) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy