2 * ============LICENSE_START===================================================
3 * SPARKY (AAI UI service)
4 * ============================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 2017 Amdocs
8 * ============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=====================================================
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
25 package org.onap.aai.sparky.sync;
27 import java.util.Calendar;
28 import java.util.Date;
30 import org.onap.aai.sparky.sync.SyncControllerImpl.SyncActions;
31 import org.onap.aai.sparky.sync.enumeration.OperationState;
32 import org.onap.aai.sparky.sync.enumeration.SynchronizerState;
34 public interface SyncController {
36 String getControllerName();
37 boolean isPeriodicSyncEnabled();
38 boolean isRunOnceSyncEnabled();
43 * @param requestedAction the requested action
46 OperationState performAction(SyncActions requestedAction);
49 * Register entity synchronizer.
51 * @param entitySynchronizer the entity synchronizer
53 void registerEntitySynchronizer(IndexSynchronizer entitySynchronizer);
56 * Register index validator.
58 * @param indexValidator the index validator
60 void registerIndexValidator(IndexValidator indexValidator);
63 * Register index cleaner.
65 * @param indexCleaner the index cleaner
67 void registerIndexCleaner(IndexCleaner indexCleaner);
74 SynchronizerState getState();
78 void setDelayInMs(long delayInMs);
80 long getSyncFrequencyInMs();
82 void setSyncFrequencyInMs(long syncFrequencyInMs);
84 Date getSyncStartTime();
86 void setSyncStartTime(Date syncStartTime);
88 Date getLastExecutionDate();
90 void setLastExecutionDate(Date lastExecutionDate);
92 Calendar getCreationTime();
94 String getNextSyncTime();