public class ElasticEmbedded extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COURSEOFFERING_ELASTIC_TYPE |
static String |
KS_ELASTIC_CLUSTER |
static String |
KS_ELASTIC_INDEX |
static Logger |
LOG |
static String |
REGISTRATION_GROUP_ELASTIC_TYPE |
Constructor and Description |
---|
ElasticEmbedded() |
Modifier and Type | Method and Description |
---|---|
protected Collection<RegGroupSearchResult> |
getAllRegistrationGroups() |
org.elasticsearch.client.Client |
getClient()
This method is quick way of keeping the indexed course data up-to-date by refreshing every timeToRefreshMs.
|
org.elasticsearch.node.Node |
getNode() |
void |
init()
Starts up a node and gets a handle to the client.
|
boolean |
isIndexOnStartup() |
void |
removeRegistrationGroupCache(List<String> registrationGroupToDeleteIds)
pass in a list of rg ids to remove from elastic cache.
|
void |
setIndexOnStartup(boolean indexOnStartup)
when the application starts, this allows you to disable the automatic index.
|
void |
setLrcService(LRCService lrcService) |
void |
setNode(org.elasticsearch.node.Node node) |
void |
setScheduleOfClassesService(ScheduleOfClassesService scheduleOfClassesService) |
void |
setSearchService(SearchService searchService) |
void |
setTimeToRefreshMs(long timeToRefreshMs) |
void |
shutdown()
Hook to close the node, should be called by spring application context.
|
void |
updateCourseOfferingCache(List<String> courseOfferingIds)
Pass in a list of course offering ids.
|
void |
updateRegistrationGroupCache(List<String> registrationGroupIds)
Pass in a list of registration group ids.
|
public static final String KS_ELASTIC_CLUSTER
public static final String KS_ELASTIC_INDEX
public static final String COURSEOFFERING_ELASTIC_TYPE
public static final String REGISTRATION_GROUP_ELASTIC_TYPE
public ElasticEmbedded() throws IOException
IOException
public void init() throws MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException, IOException, DoesNotExistException
public void updateCourseOfferingCache(List<String> courseOfferingIds) throws DoesNotExistException, MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException, IOException
courseOfferingIds
- DoesNotExistException
MissingParameterException
InvalidParameterException
OperationFailedException
PermissionDeniedException
IOException
public void updateRegistrationGroupCache(List<String> registrationGroupIds) throws DoesNotExistException, MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException, IOException
registrationGroupIds
- DoesNotExistException
MissingParameterException
InvalidParameterException
OperationFailedException
PermissionDeniedException
IOException
public void removeRegistrationGroupCache(List<String> registrationGroupToDeleteIds) throws DoesNotExistException, MissingParameterException, InvalidParameterException, OperationFailedException, PermissionDeniedException, IOException
registrationGroupToDeleteIds
- DoesNotExistException
MissingParameterException
InvalidParameterException
OperationFailedException
PermissionDeniedException
IOException
protected Collection<RegGroupSearchResult> getAllRegistrationGroups() throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
public void shutdown()
public org.elasticsearch.node.Node getNode()
public void setNode(org.elasticsearch.node.Node node)
public org.elasticsearch.client.Client getClient()
public void setSearchService(SearchService searchService)
public void setLrcService(LRCService lrcService)
public void setTimeToRefreshMs(long timeToRefreshMs)
public void setScheduleOfClassesService(ScheduleOfClassesService scheduleOfClassesService)
public boolean isIndexOnStartup()
public void setIndexOnStartup(boolean indexOnStartup)
indexOnStartup
- Copyright © 2004–2014 The Kuali Foundation. All rights reserved.