Unsure how to frame the question. Here is a try :
I have two aerospike caches (sets) say X, Y.
there are two versions of a jar each has a class com.xyz.MyClass
jar1 :
com.xyz.MyClass{
com.abc.Request request;
...
}
jar2 :
com.xyz.MyClass{
com.pqr.Request request;
...
}
Now Some objects of MyClass from jar1 are stored in cache X and some objects of MyClass from jar2 are stored in cache Y.
I want to deserialize data from both the caches, perform some computation and store in a db.
I can't serialize as the fully qualified name of MyClass in both jars is same.
I will remove one of the caches (but that will take some time). So, Hoping for a temporary fix to handle this situation for now.
Can i handle this in a nice way?
Maybe deserialize into something intermediary(that doesn't care about packages, but only class structure) and then to MyClass.
Note : both the classes have same structure, just package name of a member variable is different.
P.S. : Don't want to use multiple class loaders.