I am doing something wrong?
Pavel F.
--- excerpt of my code ---
IMap<Integer, Record> recordMap;
recordMap.keySet(new EntryExpiredPredicate( System.currentSystemMillis
() - 3600 )
class EntryExpiredPredicate implements Predicate
{
private long expireBefore;
public EntryExpiredPredicate( long expireBefore ) {
this.expireBefore = expireBefore;
}
public boolean apply(MapEntry entry) {
return entry.getLastAccessTime() < expireBefore;
}
}
-- the exception --
SEVERE: ClusterDistributedStorage
java.io.NotSerializableException: ClusterDistributedStorage
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
1156)
at java.io.ObjectOutputStream.defaultWriteFields
(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
1474)
at java.io.ObjectOutputStream.writeOrdinaryObject
(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
1150)
at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:
393)
at com.hazelcast.nio.Serializer$ObjectSerializer.write
(Serializer.java:287)
at com.hazelcast.nio.Serializer.writeObject(Serializer.java:97)
at com.hazelcast.impl.ThreadContext.toData(ThreadContext.java:131)
at com.hazelcast.nio.IOUtil.toData(IOUtil.java:58)
at com.hazelcast.impl.BaseManager$RequestBasedCall.setLocal
(BaseManager.java:611)
at com.hazelcast.impl.ConcurrentMapManager$MGetEntries.<init>
(ConcurrentMapManager.java:1268)
at com.hazelcast.impl.ConcurrentMapManager
$MIterate.createNewTargetAwareOp(ConcurrentMapManager.java:1239)
at com.hazelcast.impl.BaseManager$MultiCall.call(BaseManager.java:
877)
at com.hazelcast.impl.FactoryImpl$MProxyImpl$MProxyReal.iterate
(FactoryImpl.java:2373)
at com.hazelcast.impl.FactoryImpl$MProxyImpl$MProxyReal.keySet
(FactoryImpl.java:2348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.hazelcast.impl.FactoryImpl$MProxyImpl$Invoker.invoke
(FactoryImpl.java:1727)
at com.hazelcast.impl.$Proxy0.keySet(Unknown Source)
at com.hazelcast.impl.FactoryImpl$MProxyImpl.keySet(FactoryImpl.java:
1930)
at ClusterDistributedStorage.removeExpiredEntries
(ClusterDistributedStorage.java:180)
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
Regards
Pavel
On 18 pro, 16:00, Fuad Malikov <f...@hazelcast.com> wrote:
> Hi Pavel,
>
> First of all EntryExpiredPredicate has to be serializable.
> Do you have a class named ClusterDistributedStorage? What is it for? And is
> it serializable?
>
> Fuad
>
> > hazelcast+...@googlegroups.com<hazelcast%2Bunsu...@googlegroups.com>