congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
AbstractSessionFactory.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
org.eclipse.jetty.nosql.kvs.session.AbstractSessionFactory

Best Java code snippets using org.eclipse.jetty.nosql.kvs.session.AbstractSessionFactory.create (Showing top 13 results out of 315)

origin: com.geishatokyo.jetty.tests/test-memcached-sessions

public void testCreate() throws Exception {
  assertFalse(factory.create().equals(factory.create()));
  assertFalse(factory.create("session1").equals(factory.create("session2")));
}
origin: yyuu/jetty-nosql-memcached

public void testCreate() throws Exception {
  assertFalse(factory.create().equals(factory.create()));
  assertFalse(factory.create("session1").equals(factory.create("session2")));
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(String sessionId, long created, long accessed) {
  ISerializableSession s = create(sessionId, created);
  s.setAccessed(accessed);
  return s;
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(String sessionId) {
  ISerializableSession s = create();
  s.setId(sessionId);
  return s;
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(String sessionId, long created) {
  ISerializableSession s = create(sessionId);
  s.setCreationTime(created);
  return s;
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(AbstractSession session) {
  return getSessionFactory().create(session);
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(String sessionId) {
  return getSessionFactory().create(sessionId);
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create() {
  return getSessionFactory().create();
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(String sessionId, long created) {
  return getSessionFactory().create(sessionId, created);
}
origin: yyuu/jetty-nosql-memcached

public ISerializableSession create(AbstractSession session) {
  synchronized(session) {
    ISerializableSession s = create(session.getId(), session.getCreationTime(), session.getAccessed());
    if (session.isValid()) {
      for (String key: session.getNames()) {
        s.setAttribute(key, session.getAttribute(key));
      }
    } else {
      // we do not need to retrieve attributes of invalidated sessions since
      // they have been cleared on AbstractSession.invalidate().
      s.setValid(false);
    }
    return s;
  }
}
origin: yyuu/jetty-nosql-memcached

  public void testPackUnpack() throws Exception {
    ISerializableSession session1, session2;

    session1 = factory.create("session1");
    session1.setAttribute("foo", "foo value");
    session1.setAttribute("bar", 22222);

    byte[] raw = factory.pack(session1);
    session2 = factory.unpack(raw);
    assertNotNull(session2);

    assertEquals(session1.getId(), session2.getId());
    assertEquals(session1.getCreationTime(), session2.getCreationTime());
    assertEquals(session1.getAttributeMap(), session2.getAttributeMap());
  }
}
origin: com.geishatokyo.jetty.tests/test-memcached-sessions

  public void testPackUnpack() throws Exception {
    ISerializableSession session1, session2;

    session1 = factory.create("session1");
    session1.setAttribute("foo", "foo value");
    session1.setAttribute("bar", 22222);

    byte[] raw = factory.pack(session1);
    session2 = factory.unpack(raw);
    assertNotNull(session2);

    assertEquals(session1.getId(), session2.getId());
    assertEquals(session1.getCreationTime(), session2.getCreationTime());
    assertEquals(session1.getAttributeMap(), session2.getAttributeMap());
  }
}
origin: yyuu/jetty-nosql-memcached

synchronized (session)
  data = getSessionFactory().create(session);
org.eclipse.jetty.nosql.kvs.sessionAbstractSessionFactorycreate

Popular methods of AbstractSessionFactory

  • pack
  • unpack
  • getTranscoder
  • setClassLoader

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 17 Plugins for Android Studio
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