Package com.floragunn.signals
Class SignalsTenant
- java.lang.Object
-
- com.floragunn.signals.SignalsTenant
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SignalsTenant extends Object implements Closeable
-
-
Constructor Summary
Constructors Constructor Description SignalsTenant(String name, org.elasticsearch.client.Client client, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.script.ScriptService scriptService, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, org.elasticsearch.env.NodeEnvironment nodeEnvironment, com.floragunn.searchguard.internalauthtoken.InternalAuthTokenProvider internalAuthTokenProvider, SignalsSettings settings, AccountRegistry accountRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>ack(String watchId, com.floragunn.searchguard.user.User user)voidack(String watchId, String actionId, com.floragunn.searchguard.user.User user)org.elasticsearch.action.index.IndexResponseaddWatch(Watch watch, com.floragunn.searchguard.user.User user)org.elasticsearch.action.index.IndexResponseaddWatch(String watchId, String watchJsonString, com.floragunn.searchguard.user.User user)voidclose()static SignalsTenantcreate(String name, org.elasticsearch.client.Client client, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.script.ScriptService scriptService, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, org.elasticsearch.env.NodeEnvironment nodeEnvironment, com.floragunn.searchguard.internalauthtoken.InternalAuthTokenProvider internalAuthTokenProvider, SignalsSettings settings, AccountRegistry accountRegistry)voiddelete()voiddeleteTenantFromIndexes()StringgetConfigIndexName()intgetLocalWatchCount()StringgetName()StringgetScopedName()StringgetWatchIdForConfigIndex(Watch watch)StringgetWatchIdForConfigIndex(String watchId)WatchStategetWatchState(String watchId)WatchStateManagergetWatchStateManager()WatchStateIndexReadergetWatchStateReader()voidinit()booleanisActive()voidpause()voidrestart()voidrestartAsync()voidresume()booleanrunsWatchLocally(String watchId)voidshutdown()voidshutdownHard()StringtoString()List<String>unack(String watchId, com.floragunn.searchguard.user.User user)booleanunack(String watchId, String actionId, com.floragunn.searchguard.user.User user)
-
-
-
Constructor Detail
-
SignalsTenant
public SignalsTenant(String name, org.elasticsearch.client.Client client, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.script.ScriptService scriptService, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, org.elasticsearch.env.NodeEnvironment nodeEnvironment, com.floragunn.searchguard.internalauthtoken.InternalAuthTokenProvider internalAuthTokenProvider, SignalsSettings settings, AccountRegistry accountRegistry)
-
-
Method Detail
-
create
public static SignalsTenant create(String name, org.elasticsearch.client.Client client, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.script.ScriptService scriptService, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, org.elasticsearch.env.NodeEnvironment nodeEnvironment, com.floragunn.searchguard.internalauthtoken.InternalAuthTokenProvider internalAuthTokenProvider, SignalsSettings settings, AccountRegistry accountRegistry) throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
-
init
public void init() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
pause
public void pause() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
resume
public void resume() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
isActive
public boolean isActive() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
shutdown
public void shutdown()
-
shutdownHard
public void shutdownHard()
-
restart
public void restart() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
restartAsync
public void restartAsync()
-
runsWatchLocally
public boolean runsWatchLocally(String watchId)
-
getLocalWatchCount
public int getLocalWatchCount()
-
addWatch
public org.elasticsearch.action.index.IndexResponse addWatch(Watch watch, com.floragunn.searchguard.user.User user) throws IOException
- Throws:
IOException
-
addWatch
public org.elasticsearch.action.index.IndexResponse addWatch(String watchId, String watchJsonString, com.floragunn.searchguard.user.User user) throws com.floragunn.searchsupport.config.validation.ConfigValidationException, IOException
- Throws:
com.floragunn.searchsupport.config.validation.ConfigValidationExceptionIOException
-
unack
public boolean unack(String watchId, String actionId, com.floragunn.searchguard.user.User user)
-
getWatchState
public WatchState getWatchState(String watchId)
-
deleteTenantFromIndexes
public void deleteTenantFromIndexes()
-
delete
public void delete()
-
getWatchStateManager
public WatchStateManager getWatchStateManager()
-
getName
public String getName()
-
getConfigIndexName
public String getConfigIndexName()
-
getScopedName
public String getScopedName()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getWatchStateReader
public WatchStateIndexReader getWatchStateReader()
-
-