Search in sources :

Example 91 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapProxyImpl method set.

@Override
public void set(K k, V v, long ttl, TimeUnit timeunit) {
    checkNotNull(k, NULL_KEY_IS_NOT_ALLOWED);
    checkNotNull(v, NULL_VALUE_IS_NOT_ALLOWED);
    Data key = toData(k, partitionStrategy);
    Data value = toData(v);
    setInternal(key, value, ttl, timeunit);
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Example 92 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapProxyImpl method tryRemove.

@Override
public boolean tryRemove(K key, long timeout, TimeUnit timeunit) {
    checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
    Data dataKey = toData(key, partitionStrategy);
    return tryRemoveInternal(dataKey, timeout, timeunit);
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Example 93 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapProxyImpl method unlock.

@Override
public void unlock(K key) {
    checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
    NodeEngine nodeEngine = getNodeEngine();
    Data dataKey = toData(key, partitionStrategy);
    lockSupport.unlock(nodeEngine, dataKey);
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) Data(com.hazelcast.nio.serialization.Data)

Example 94 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapProxyImpl method putAsync.

@Override
public ICompletableFuture<V> putAsync(K key, V value, long ttl, TimeUnit timeunit) {
    checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
    checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);
    Data dataKey = toData(key, partitionStrategy);
    Data dataValue = toData(value);
    return new DelegatingFuture<V>(putAsyncInternal(dataKey, dataValue, ttl, timeunit), getNodeEngine().getSerializationService());
}
Also used : Data(com.hazelcast.nio.serialization.Data) DelegatingFuture(com.hazelcast.util.executor.DelegatingFuture)

Example 95 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapProxyImpl method getAsync.

@Override
public ICompletableFuture<V> getAsync(K k) {
    checkNotNull(k, NULL_KEY_IS_NOT_ALLOWED);
    Data key = toData(k, partitionStrategy);
    NodeEngine nodeEngine = getNodeEngine();
    return new DelegatingFuture<V>(getAsyncInternal(key), nodeEngine.getSerializationService());
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) Data(com.hazelcast.nio.serialization.Data) DelegatingFuture(com.hazelcast.util.executor.DelegatingFuture)

Aggregations

Data (com.hazelcast.nio.serialization.Data)773 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)140 Test (org.junit.Test)121 QuickTest (com.hazelcast.test.annotation.QuickTest)118 ParallelTest (com.hazelcast.test.annotation.ParallelTest)108 ArrayList (java.util.ArrayList)81 Map (java.util.Map)64 SerializationService (com.hazelcast.spi.serialization.SerializationService)54 HashMap (java.util.HashMap)54 NodeEngine (com.hazelcast.spi.NodeEngine)50 HashSet (java.util.HashSet)39 Address (com.hazelcast.nio.Address)28 AbstractMap (java.util.AbstractMap)28 Record (com.hazelcast.map.impl.record.Record)27 HazelcastInstance (com.hazelcast.core.HazelcastInstance)26 HeapData (com.hazelcast.internal.serialization.impl.HeapData)26 List (java.util.List)20 Future (java.util.concurrent.Future)20 CacheEventData (com.hazelcast.cache.impl.CacheEventData)19 Operation (com.hazelcast.spi.Operation)18