Added renew for TypesKnowledge
This commit is contained in:
parent
660f0ea4a5
commit
30eac775f6
|
@ -127,6 +127,18 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addOffset(Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||||
|
if(offset!=null) {
|
||||||
|
queryParams.put(AccessPath.OFFSET_QUERY_PARAMETER, offset.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addLimit(Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||||
|
if(limit!=null) {
|
||||||
|
queryParams.put(AccessPath.LIMIT_QUERY_PARAMETER, limit.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected ContextCacheRenewal contextCacheRenewal = new ContextCacheRenewal() {
|
protected ContextCacheRenewal contextCacheRenewal = new ContextCacheRenewal() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -191,6 +203,8 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
|
||||||
|
|
||||||
Map<String,String> parameters = new HashMap<>();
|
Map<String,String> parameters = new HashMap<>();
|
||||||
addIncludeMeta(parameters);
|
addIncludeMeta(parameters);
|
||||||
|
addOffset(parameters);
|
||||||
|
addLimit(parameters);
|
||||||
gxHTTPStringRequest.queryParams(parameters);
|
gxHTTPStringRequest.queryParams(parameters);
|
||||||
|
|
||||||
HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();
|
HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();
|
||||||
|
@ -225,6 +239,10 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
|
||||||
public ModelKnowledge<Type, TypeInformation> getModelKnowledge() {
|
public ModelKnowledge<Type, TypeInformation> getModelKnowledge() {
|
||||||
return typesKnowledge.getModelKnowledge();
|
return typesKnowledge.getModelKnowledge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void renewModelKnowledge() {
|
||||||
|
typesKnowledge.renew();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It reads the context from server.
|
* It reads the context from server.
|
||||||
|
|
Loading…
Reference in New Issue