Skip to content
Snippets Groups Projects
Commit 3e0238c3 authored by Ramin Yaghoubzadeh Torky's avatar Ramin Yaghoubzadeh Torky
Browse files

ipaaca-java: Buffers get short unique IDs as in Py and C++

parent e3016c4d
No related branches found
No related tags found
No related merge requests found
......@@ -46,9 +46,14 @@ public abstract class Buffer
private final String owningComponentName;
private List<IUEventHandler> eventHandlers = new ArrayList<IUEventHandler>();
protected final String uuid = UUID.randomUUID().toString().replaceAll("-", "");
protected final String uuid = UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
protected String uniqueName;
public String getUniqueShortName()
{
return owningComponentName + "ID" + uuid;
}
public String getUniqueName()
{
return uniqueName;
......
......@@ -123,7 +123,7 @@ public class InputBuffer extends Buffer
public InputBuffer(String owningComponentName, Set<String> categoryInterests)
{
super(owningComponentName);
uniqueName = "/ipaaca/component/" + owningComponentName + "ID" + uuid + "/IB";
uniqueName = "/ipaaca/component/" + getUniqueShortName() + "/IB";
for (String cat : categoryInterests)
{
......
......@@ -93,7 +93,7 @@ public class OutputBuffer extends Buffer
{
super(owningComponentName);
uniqueName = "/ipaaca/component/" + owningComponentName + "ID" + uuid + "/OB";
uniqueName = "/ipaaca/component/" + getUniqueShortName() + "/OB";
logger.debug("Creating server for {}", uniqueName);
server = Factory.getInstance().createLocalServer(uniqueName);
try
......
......@@ -247,7 +247,7 @@ class Payload(dict):
self._collected_modifications = {}
self._collected_removals = []
self._update_on_every_change = True
self.batch_update_lock.release()
self._batch_update_lock.release()
def _remotely_enforced_setitem(self, k, v):
"""Sets an item when requested remotely."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment