Skip to contentPackage: ChannelInfoRegistryMediator
ChannelInfoRegistryMediator
Coverage
1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.datastore.internal.mediator;
14:
15: import org.eclipse.kapua.KapuaIllegalArgumentException;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.service.datastore.internal.schema.Metadata;
18: import org.eclipse.kapua.service.datastore.model.ChannelInfo;
19: import org.eclipse.kapua.service.elasticsearch.client.exception.ClientException;
20: import org.eclipse.kapua.service.elasticsearch.client.exception.QueryMappingException;
21: import org.eclipse.kapua.service.storable.exception.MappingException;
22:
23: /**
24: * Channel information registry mediator definition
25: *
26: * @since 1.0.0
27: */
28: public interface ChannelInfoRegistryMediator {
29:
30: /**
31: * Get the channel info metadata
32: *
33: * @param scopeId
34: * @param indexedOn
35: * @return
36: * @throws ClientException
37: */
38: Metadata getMetadata(KapuaId scopeId, long indexedOn)
39: throws ClientException, MappingException;
40:
41: /**
42: * On before channel info delete event handler
43: *
44: * @param channelInfo
45: * @throws KapuaIllegalArgumentException
46: * @throws ConfigurationException
47: * @throws QueryMappingException
48: * @throws ClientException
49: */
50: void onBeforeChannelInfoDelete(ChannelInfo channelInfo)
51: throws KapuaIllegalArgumentException,
52: ConfigurationException,
53: QueryMappingException,
54: ClientException;
55:
56: /**
57: * On after channel info delete event handler
58: *
59: * @param channelInfo
60: */
61: void onAfterChannelInfoDelete(ChannelInfo channelInfo);
62: }