public abstract class ServiceRunner extends Object
Copyright © Enremmeta LLC 2014. All Rights Reserved. This code is licensed under Affero GPL 3.0
Modifier and Type | Field and Description |
---|---|
protected AdCache |
adCache |
protected org.apache.commons.cli.CommandLine |
cl |
static String |
COLLECTIONS_DB_SERVICE |
protected Lot49Config |
config |
private String |
configFilename |
private AtomicLong |
counter |
private Map<String,DbService> |
dbServices |
private ExecutorService |
executor |
private HazelcastService |
hazelcastService |
private IntegralService |
integralService |
private long |
lastRolloverEnforcerRan |
private MaxMindFacade |
maxMind |
protected org.apache.commons.cli.Options |
opts |
private Orchestrator |
orchestrator |
private Map<String,Provider> |
providers |
protected static ServiceRunner |
runner |
protected SandboxSecurityManager |
sandboxSecurityManager |
private ScheduledExecutorService |
scheduledExecutor |
private SegmentToOwnerCodec |
segmentToOwnerCodec |
private DaoMapOfUserAttributes |
userAttributesCacheService |
private DaoMapOfUserSegments |
userSegmentsCacheService |
Modifier | Constructor and Description |
---|---|
protected |
ServiceRunner() |
protected static ServiceRunner runner
protected org.apache.commons.cli.Options opts
protected org.apache.commons.cli.CommandLine cl
private HazelcastService hazelcastService
private MaxMindFacade maxMind
private Orchestrator orchestrator
private DaoMapOfUserAttributes userAttributesCacheService
private DaoMapOfUserSegments userSegmentsCacheService
protected SandboxSecurityManager sandboxSecurityManager
protected AdCache adCache
protected Lot49Config config
private String configFilename
private ScheduledExecutorService scheduledExecutor
private ExecutorService executor
private IntegralService integralService
private long lastRolloverEnforcerRan
private AtomicLong counter
private SegmentToOwnerCodec segmentToOwnerCodec
public static final String COLLECTIONS_DB_SERVICE
public static ServiceRunner getInstance()
public AdCache getAdCache()
public DaoMapOfUserAttributes getUserAttributesCacheService()
public DaoMapOfUserSegments getUserSegmentsCacheService()
public ScheduledExecutorService getScheduledExecutor()
public ExecutorService getExecutor()
protected String getConfigFilename()
public SandboxSecurityManager getSandboxSecurityManager()
public void initExecutors()
public org.apache.commons.cli.CommandLine getCl()
public void initProviders() throws Lot49Exception
Lot49Exception
public MaxMindFacade getMaxMind()
public void initGeo() throws IOException
IOException
public void initOrchestrator() throws Lot49Exception
Lot49Exception
public void initLogging() throws Lot49Exception
Lot49Exception
public org.apache.commons.cli.Options getOpts()
public Orchestrator getOrchestrator()
private static final String getRolloverEnforcerId()
public void scheduleLogRolloverEnforcer()
minute of hour
is 0), writes an entry into every log
with mostly NULLs. This will force the roll over process to work.public void initAdapters() throws Lot49Exception
Lot49Exception
public void setCl(org.apache.commons.cli.CommandLine cl)
public HazelcastService getHazelcastService()
public String getNextId()
public SegmentToOwnerCodec getSegmentToOwnerCodec()
public void initCodecs() throws Lot49Exception
Lot49Exception
public void initDbServices() throws Lot49Exception
DbService
for every item in DbConfigs
, and throw an exception
the first time an error happens.Lot49Exception
public void initSecurityManager()
public void initCaches() throws Lot49Exception
Lot49Exception
public void setOpts(org.apache.commons.cli.Options opts)
public Lot49Config getConfig()
public void parseCommandLineArgs(String[] argv) throws Lot49Exception
Lot49Exception
protected void usage()
public void setConfig(Lot49Config config)
config
- the configurationpublic Lot49Config loadConfig() throws Lot49Exception
Lot49Exception
public void updateSubcriptionData()
public IntegralService getIntegralService()
public void initIntegral()