I am implementing some services with cache

Viewed 52

I am implementing some services with hazelcast, as follows

The data I am sending to cache is as follows

{
        "cfEditId": 1542,
        "documentId": 32398,
        "clientId": 1619,
        "serviceDocSetupId": 1189,
        "cfFormId": 1062,,
        "signedDate": "2021-08-11T17:13Z"
    },
    {
        "cfEditId": 1636,
        "documentId": 32854,
        "clientId": 1619,
        "serviceDocSetupId": 1196,
        "cfFormId": 1065,,
        "signedDate": "2022-03-04T15:58:59Z"
    }
    

When I debug the serializable ones it kind of puts a -100 and -101, has that happened to anyone, I'm working with spring using hazelcast.

But at the moment of reading I am getting the following error Error Image

@Override
public void putMatrix(Matrix matrix) {
    String cacheName = String.format("%s_%s", CacheNames.MATRIX, MultitenantUtil.getContext().getAccount());
    IMap<Long, Matrix> map = (IMap<Long, Matrix>) cacheManager.getCache(cacheName).getNativeCache();
    map.put(matrix.getCfEditId(), matrix);
}

@Override
public Matrix getMatrix(Long cfEditId) {
    String cacheName = String.format("%s_%s", CacheNames.MATRIX, MultitenantUtil.getContext().getAccount());
    IMap<Long, Matrix> map = (IMap<Long, Matrix>) cacheManager.getCache(cacheName).getNativeCache();
    return map.get(cfEditId);
}
1 Answers

Try to put something different then same value as a key all time "Matrix.getCfEditId()" - static getter in Matrix? e.g. matrix.getCfEditId()

Related