Retrieving available values from Simple List with API
Hello everyone,
i’m currently retrieving available values from a simple list using this code below
<br />IAgileSession session = ... //created standard with url, usr, pass<br />IAdminList adminList = session.getAdminInstance().getListLibrary().getAdminList(listName);<br />IAgileList list = adminListByName.getValues();<br /> Iterator<IAgileList> iterator = list.getChildNodes().iterator();<br /> Collection<Sting> result = new ArrayList<>();<br /> while (iterator.hasNext()) {<br /> IAgileList iAgileList = (IAgileList) iterator.next();<br />result.add(iAgileList.getValue());<br /> }<br /> return result;<br />
it works fine majority of the time, except when the list is quite big (aroung 2000 elements and more).
What it causes is a fixed increase of the CPU usage on the server where a custom application runs, even though the call to such method ends correctly.
The only way to “clear” CPU usage is restart the application.
Is there any other way to obtain such values or any workaround to work with big lists? Thank you in advance
sorry cannot edit 1st post, reposting just code
IAgileSession session = … //created standard with url, usr, pass
IAdminList adminList = session.getAdminInstance().getListLibrary().getAdminList(listName);
IAgileList list = adminListByName.getValues();
Iterator<IAgileList>; iterator = list.getChildNodes().iterator();
Collection<Sting> result = new ArrayList<>();
while (iterator.hasNext()) {
IAgileList iAgileList = (IAgileList) iterator.next();result.add(iAgileList.getValue());
}
return result;