Package org.apache.lucene.replicator

Examples of org.apache.lucene.replicator.SessionToken


        case RELEASE:
          replicator.release(extractRequestParam(req, REPLICATE_SESSION_ID_PARAM));
          break;
        case UPDATE:
          String currVersion = req.getParameter(REPLICATE_VERSION_PARAM);
          SessionToken token = replicator.checkForUpdate(currVersion);
          if (token == null) {
            resOut.write(0); // marker for null token
          } else {
            resOut.write(1); // marker for null token
            token.serialize(new DataOutputStream(resOut));
          }
          break;
      }
    } catch (Exception e) {
      resp.setStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR); // propagate the failure
View Full Code Here


        final DataInputStream dis = new DataInputStream(responseInputStream(response));
        try {
          if (dis.readByte() == 0) {
            return null;
          } else {
            return new SessionToken(dis);
          }
        } finally {
          dis.close();
        }
      }
View Full Code Here

        final DataInputStream dis = new DataInputStream(responseInputStream(response));
        try {
          if (dis.readByte() == 0) {
            return null;
          } else {
            return new SessionToken(dis);
          }
        } finally {
          dis.close();
        }
      }
View Full Code Here

        case RELEASE:
          replicator.release(extractRequestParam(req, REPLICATE_SESSION_ID_PARAM));
          break;
        case UPDATE:
          String currVersion = req.getParameter(REPLICATE_VERSION_PARAM);
          SessionToken token = replicator.checkForUpdate(currVersion);
          if (token == null) {
            resOut.write(0); // marker for null token
          } else {
            resOut.write(1); // marker for null token
            token.serialize(new DataOutputStream(resOut));
          }
          break;
      }
    } catch (Exception e) {
      resp.setStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR); // propagate the failure
View Full Code Here

TOP

Related Classes of org.apache.lucene.replicator.SessionToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.