diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaClient.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaClient.java index e61b20ee9..5bee3a46b 100644 --- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaClient.java +++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaClient.java @@ -659,6 +659,11 @@ public DataTypeManager getDynamicDataTypeManager() throws UaException { () -> dynamicDataTypeManagerFactory.create(this, getNamespaceTable(), getDataTypeTree())); } + /** Reset the cached dynamic {@link DataTypeManager}. */ + public void resetDynamicDataTypeManager() { + dynamicDataTypeManager.reset(); + } + /** * Get a "static" {@link EncodingContext} instance. * @@ -713,6 +718,11 @@ public ServerTable getServerTable() { }); } + /** Reset the cached dynamic {@link EncodingContext}. */ + public void resetDynamicEncodingContext() { + dynamicEncodingContext.reset(); + } + /** * Get the local copy of the server's NamespaceTable (NamespaceArray). * @@ -892,6 +902,11 @@ public DataTypeTree getDataTypeTree() throws UaException { } } + /** Reset the cached {@link DataTypeTree}. */ + public void resetDataTypeTree() { + dataTypeTree.reset(); + } + /** * Read the {@link DataTypeTree} from the server and update the local copy. * @@ -899,7 +914,7 @@ public DataTypeTree getDataTypeTree() throws UaException { * @throws UaException if an error occurs while reading the DataTypes. */ public DataTypeTree readDataTypeTree() throws UaException { - dataTypeTree.reset(); + resetDataTypeTree(); return getDataTypeTree(); } @@ -936,6 +951,11 @@ public ObjectTypeTree getObjectTypeTree() throws UaException { } } + /** Reset the cached {@link ObjectTypeTree}. */ + public void resetObjectTypeTree() { + objectTypeTree.reset(); + } + /** * Read the {@link ObjectTypeTree} from the server and update the local copy. * @@ -943,7 +963,7 @@ public ObjectTypeTree getObjectTypeTree() throws UaException { * @throws UaException if an error occurs while reading the ObjectTypes. */ public ObjectTypeTree readObjectTypeTree() throws UaException { - objectTypeTree.reset(); + resetObjectTypeTree(); return getObjectTypeTree(); } @@ -981,6 +1001,11 @@ public VariableTypeTree getVariableTypeTree() throws UaException { } } + /** Reset the cached {@link VariableTypeTree}. */ + public void resetVariableTypeTree() { + variableTypeTree.reset(); + } + /** * Read the {@link VariableTypeTree} from the server and update the local copy. * @@ -988,7 +1013,7 @@ public VariableTypeTree getVariableTypeTree() throws UaException { * @throws UaException if an error occurs while reading the VariableTypes. */ public VariableTypeTree readVariableTypeTree() throws UaException { - variableTypeTree.reset(); + resetVariableTypeTree(); return getVariableTypeTree(); } @@ -1023,6 +1048,11 @@ public OperationLimits getOperationLimits() throws UaException { return operationLimits.getOrThrow(() -> OperationLimits.read(this)); } + /** Reset the cached {@link OperationLimits}. */ + public void resetOperationLimits() { + operationLimits.reset(); + } + /** * Read the server's OperationLimits and update the local copy. * @@ -1030,7 +1060,7 @@ public OperationLimits getOperationLimits() throws UaException { * @throws UaException if an error occurs reading the operation limits. */ public OperationLimits readOperationLimits() throws UaException { - operationLimits.reset(); + resetOperationLimits(); return getOperationLimits(); } @@ -1099,7 +1129,7 @@ public RequestHeader newRequestHeader(NodeId authToken, UInteger requestTimeout) public void setDataTypeTreeFactory(DataTypeTreeFactory dataTypeTreeFactory) { this.dataTypeTreeFactory = dataTypeTreeFactory; - dataTypeTree.reset(); + resetDataTypeTree(); } /** @@ -1125,8 +1155,8 @@ public void setDynamicDataTypeManagerFactory( this.dynamicDataTypeManagerFactory = dynamicDataTypeManagerFactory; - dynamicDataTypeManager.reset(); - dynamicEncodingContext.reset(); + resetDynamicDataTypeManager(); + resetDynamicEncodingContext(); } // region Attribute Services