congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
KeyValueStoreSessionManager
Code IndexAdd Tabnine to your IDE (free)

How to use
KeyValueStoreSessionManager
in
org.eclipse.jetty.nosql.kvs

Best Java code snippets using org.eclipse.jetty.nosql.kvs.KeyValueStoreSessionManager (Showing top 14 results out of 315)

origin: yyuu/jetty-nosql-memcached

@Override
protected boolean removeSession(final String idInCluster)
{
  return deleteKey(idInCluster);
}
origin: yyuu/jetty-nosql-memcached

protected boolean setKey(final String idInCluster, final ISerializableSession data) throws TranscoderException
{
  byte[] raw = getSessionFactory().pack(data);
  if (raw == null)
  {
    return false;
  }
  else
  {
    return ((KeyValueStoreSessionIdManager) _sessionIdManager).setKey(mangleKey(idInCluster), raw,
      getMaxInactiveInterval());
  }
}
origin: yyuu/jetty-nosql-memcached

@Override
public AbstractSession getSession(final String idInCluster)
{
  AbstractSession session;
  return loadSession(idInCluster);
}
origin: yyuu/jetty-nosql-memcached

protected ISerializableSession getKey(final String idInCluster) throws TranscoderException
{
  byte[] raw = ((KeyValueStoreSessionIdManager) _sessionIdManager).getKey(mangleKey(idInCluster));
  if (raw == null)
  {
    return null;
  }
  else
  {
    return getSessionFactory().unpack(raw);
  }
}
origin: yyuu/jetty-nosql-memcached

@Override
protected void update(final NoSqlSession session, final String newClusterId, final String newNodeId)
  throws Exception
{
  ISerializableSession data = getKey(session.getClusterId());
  if (data == null)
  {
    log.warn("Couldn't get session data for old key {}", session.getClusterId());
    return;
  }
  deleteKey(session.getClusterId());
  setKey(newClusterId, data);
}
origin: yyuu/jetty-nosql-memcached

  deleteKey(session.getId());
  return null;
synchronized (session)
  data = getSessionFactory().create(session);
  if (!setKey(session.getId(), data))
origin: yyuu/jetty-nosql-memcached

if (_cookieDomain == null)
  String[] cookieDomains = getContextHandler().getVirtualHosts();
  String cookiePath = getContext().getContextPath();
  if (cookiePath == null || "".equals(cookiePath))
  ClassLoader cl = getContext().getClassLoader();
  if (cl != null) {
    sessionFactory.setClassLoader(cl);
origin: yyuu/jetty-nosql-memcached

ISerializableSession data = getKey(clusterId);
log.debug("loadSession: loaded: id=" + clusterId + ", data=" + data);
origin: yyuu/jetty-nosql-memcached

@Override
public void doStart() throws Exception {
  log.info("starting...");
  super.doStart();
  log.info("started.");
}
origin: yyuu/jetty-nosql-memcached

  @Override
  public void doStop() throws Exception {
    log.info("stopping...");
    super.doStop();
    log.info("stopped.");
  }
}
origin: yyuu/jetty-nosql-memcached

public void invalidateAll(final String sessionId)
{
  // tell all contexts that may have a session object with this id to
  // get rid of them
  Handler[] contexts = _server.getChildHandlersByClass(ContextHandler.class);
  for (int i = 0; contexts != null && i < contexts.length; i++)
  {
    SessionHandler sessionHandler = ((ContextHandler) contexts[i]).getChildHandlerByClass(SessionHandler.class);
    if (sessionHandler != null)
    {
      SessionManager manager = sessionHandler.getSessionManager();
      if (manager != null && manager instanceof KeyValueStoreSessionManager)
      {
        ((KeyValueStoreSessionManager) manager).invalidateSession(sessionId);
      }
    }
  }
}
origin: yyuu/jetty-nosql-memcached

try
  data = getKey(session.getClusterId());
origin: yyuu/jetty-nosql-memcached

protected boolean addKey(final String idInCluster, final ISerializableSession data) throws TranscoderException
{
  byte[] raw = getSessionFactory().pack(data);
  if (raw == null)
  {
    return false;
  }
  else
  {
    return ((KeyValueStoreSessionIdManager) _sessionIdManager).addKey(mangleKey(idInCluster), raw,
      getMaxInactiveInterval());
  }
}
origin: yyuu/jetty-nosql-memcached

@Override
protected boolean remove(final NoSqlSession session)
{
  if (session == null)
  {
    return false;
  }
  else
  {
    return deleteKey(session.getId());
  }
}
org.eclipse.jetty.nosql.kvsKeyValueStoreSessionManager

Most used methods

  • deleteKey
  • doStart
  • doStop
  • getContext
  • getContextHandler
  • getKey
  • getMaxInactiveInterval
  • getSessionFactory
  • invalidateSession
  • loadSession
  • mangleKey
  • renewSessionId
  • mangleKey,
  • renewSessionId,
  • setKey

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • Permission (java.security)
    Legacy security code; do not use.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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