Tabnine Logo
RedissonClient.getMap
Code IndexAdd Tabnine to your IDE (free)

How to use
getMap
method
in
org.redisson.api.RedissonClient

Best Java code snippets using org.redisson.api.RedissonClient.getMap (Showing top 20 results out of 315)

origin: redisson/redisson

protected RMap<Object, Object> getMap(String name, CacheConfig config) {
  if (codec != null) {
    return redisson.getMap(name, codec);
  }
  return redisson.getMap(name);
}
origin: redisson/redisson

protected RMap<Object, Object> getMap(String name, CacheConfig config) {
  if (codec != null) {
    return redisson.getMap(name, codec);
  }
  return redisson.getMap(name);
}
origin: mrniko/netty-socketio

@Override
public <K, V> Map<K, V> createMap(String name) {
  return redisClient.getMap(name);
}
origin: mrniko/netty-socketio

public RedissonStore(UUID sessionId, RedissonClient redisson) {
  this.map = redisson.getMap(sessionId.toString());
}
origin: redisson/redisson

@Override
public R call() throws Exception {
  this.codec = (Codec) codecClass.getConstructor().newInstance();
  
  Injector.inject(collator, redisson);
  
  RMap<KOut, VOut> resultMap = redisson.getMap(resultMapName, codec);
  R result = collator.collate(resultMap);
  resultMap.delete();
  return result;
}
origin: redisson/redisson

@Override
public R call() throws Exception {
  this.codec = (Codec) codecClass.getConstructor().newInstance();
  
  Injector.inject(collator, redisson);
  
  RMap<KOut, VOut> resultMap = redisson.getMap(resultMapName, codec);
  R result = collator.collate(resultMap);
  resultMap.delete();
  return result;
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RedissonSession(String keyPrefix, String sessionId) {
  this.delegate = new MapSession(sessionId);
  map = redisson.getMap(keyPrefix + sessionId, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
}

origin: redisson/redisson

public RedissonSession(String keyPrefix, String sessionId) {
  this.delegate = new MapSession(sessionId);
  map = redisson.getMap(keyPrefix + sessionId, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
}

origin: redisson/redisson

@Override
public void scheduleWithFixedDelay(ScheduledWithFixedDelayParameters params) {
  executeRunnable(params, false);
  if (!redisson.getMap(tasksName, StringCodec.INSTANCE).containsKey(params.getRequestId())) {
    return;
  }
  
  long newStartTime = System.currentTimeMillis() + params.getDelay();
  params.setStartTime(newStartTime);
  asyncScheduledServiceAtFixed(params.getExecutorId(), params.getRequestId()).scheduleWithFixedDelay(params);
}

origin: redisson/redisson

@Override
public void scheduleWithFixedDelay(ScheduledWithFixedDelayParameters params) {
  executeRunnable(params, false);
  if (!redisson.getMap(tasksName, StringCodec.INSTANCE).containsKey(params.getRequestId())) {
    return;
  }
  
  long newStartTime = System.currentTimeMillis() + params.getDelay();
  params.setStartTime(newStartTime);
  asyncScheduledServiceAtFixed(params.getExecutorId(), params.getRequestId()).scheduleWithFixedDelay(params);
}

origin: redisson/redisson

public RedissonSession(String keyPrefix) {
  this.delegate = new MapSession();
  map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
  Map<String, Object> newMap = new HashMap<String, Object>(3);
  newMap.put("session:creationTime", delegate.getCreationTime());
  newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime());
  newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds());
  map.putAll(newMap);
  updateExpiration();
  
  String channelName = getEventsChannelName(delegate.getId());
  RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE);
  topic.publish(delegate.getId());
}
origin: redisson/redisson

public RedissonSession(String keyPrefix) {
  this.delegate = new MapSession();
  map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
  Map<String, Object> newMap = new HashMap<String, Object>(3);
  newMap.put("session:creationTime", delegate.getCreationTime());
  newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime());
  newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds());
  map.putAll(newMap);
  updateExpiration();
  
  String channelName = getEventsChannelName(delegate.getId());
  RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE);
  topic.publish(delegate.getId());
}
origin: redisson/redisson

  @Override
  public void operationComplete(Future<RemoteServiceCancelRequest> future) throws Exception {
    if (!future.isSuccess()) {
      return;
    }
    boolean res = submitFuture.cancel(future.getNow().isMayInterruptIfRunning());
    if (res) {
      RemoteServiceCancelResponse response = new RemoteServiceCancelResponse(request.getId(), true);
      if (!responseHolder.compareAndSet(null, response)) {
        response = new RemoteServiceCancelResponse(request.getId(), false);
      }
      
      // could be removed not from future object
      if (future.getNow().isSendResponse()) {
        RMap<String, RemoteServiceCancelResponse> map = redisson.getMap(cancelResponseMapName, new CompositeCodec(StringCodec.INSTANCE, codec, codec));
        map.fastPutAsync(request.getId(), response);
        map.expireAsync(60, TimeUnit.SECONDS);
      }
    }
  }
});
origin: redisson/redisson

  @Override
  public void operationComplete(Future<RemoteServiceCancelRequest> future) throws Exception {
    if (!future.isSuccess()) {
      return;
    }
    boolean res = submitFuture.cancel(future.getNow().isMayInterruptIfRunning());
    if (res) {
      RemoteServiceCancelResponse response = new RemoteServiceCancelResponse(request.getId(), true);
      if (!responseHolder.compareAndSet(null, response)) {
        response = new RemoteServiceCancelResponse(request.getId(), false);
      }
      
      // could be removed not from future object
      if (future.getNow().isSendResponse()) {
        RMap<String, RemoteServiceCancelResponse> map = redisson.getMap(cancelResponseMapName, new CompositeCodec(StringCodec.INSTANCE, codec, codec));
        map.fastPutAsync(request.getId(), response);
        map.expireAsync(60, TimeUnit.SECONDS);
      }
    }
  }
});
origin: redisson/redisson

private void cancelExecution(RemoteInvocationOptions optionsCopy,
    boolean mayInterruptIfRunning, RemotePromise<Object> remotePromise) {
  RMap<String, RemoteServiceCancelRequest> canceledRequests = redisson.getMap(cancelRequestMapName, new CompositeCodec(StringCodec.INSTANCE, codec, codec));
  canceledRequests.fastPutAsync(remotePromise.getRequestId().toString(), new RemoteServiceCancelRequest(mayInterruptIfRunning, false));
  canceledRequests.expireAsync(60, TimeUnit.SECONDS);
  
  // subscribe for async result if it's not expected before
  if (!optionsCopy.isResultExpected()) {
    RemoteInvocationOptions options = new RemoteInvocationOptions(optionsCopy);
    options.expectResultWithin(60, TimeUnit.SECONDS);
    RFuture<RRemoteServiceResponse> responseFuture = pollResponse(options.getExecutionTimeoutInMillis(), remotePromise.getRequestId(), false);
    awaitResultAsync(options, remotePromise, responseFuture);
  }
}
origin: redisson/redisson

private void cancelExecution(RemoteInvocationOptions optionsCopy,
    boolean mayInterruptIfRunning, RemotePromise<Object> remotePromise) {
  RMap<String, RemoteServiceCancelRequest> canceledRequests = redisson.getMap(cancelRequestMapName, new CompositeCodec(StringCodec.INSTANCE, codec, codec));
  canceledRequests.fastPutAsync(remotePromise.getRequestId().toString(), new RemoteServiceCancelRequest(mayInterruptIfRunning, false));
  canceledRequests.expireAsync(60, TimeUnit.SECONDS);
  
  // subscribe for async result if it's not expected before
  if (!optionsCopy.isResultExpected()) {
    RemoteInvocationOptions options = new RemoteInvocationOptions(optionsCopy);
    options.expectResultWithin(60, TimeUnit.SECONDS);
    RFuture<RRemoteServiceResponse> responseFuture = pollResponse(options.getExecutionTimeoutInMillis(), remotePromise.getRequestId(), false);
    awaitResultAsync(options, remotePromise, responseFuture);
  }
}
org.redisson.apiRedissonClientgetMap

Javadoc

Returns map instance by name.

Popular methods of RedissonClient

  • shutdown
    Shuts down Redisson instance but NOT Redis server Shutdown ensures that no tasks are submitted for '
  • getLock
    Returns lock instance by name. Implements a non-fair locking so doesn't guarantees an acquire order
  • getTopic
    Returns topic instance by name using provided codec for messages.
  • getBucket
    Returns object holder instance by name using provided codec for object.
  • getConfig
    Allows to get configuration provided during Redisson instance creation. Further changes on this obje
  • getMapCache
    Returns map-based cache instance by name using provided codec for both cache keys and values. Suppor
  • getAtomicLong
    Returns atomicLong instance by name.
  • getKeys
    Returns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key
  • getScript
    Returns script operations object using provided codec.
  • getSemaphore
    Returns semaphore instance by name
  • getSet
    Returns set instance by name using provided codec for set objects.
  • getBlockingQueue
    Returns unbounded blocking queue instance by name using provided codec for queue objects.
  • getSet,
  • getBlockingQueue,
  • getList,
  • getScoredSortedSet,
  • getExecutorService,
  • getFairLock,
  • getQueue,
  • getReadWriteLock,
  • getListMultimap

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now