Examples of Flease


Examples of org.xtreemfs.babudb.pbrpc.GlobalTypes.FLease

    public ErrorResponse parseRPCMessage(Request rq) {
        ErrorResponse resp = super.parseRPCMessage(rq);
       
        if (resp == null) {
            FleaseMessage message = new FleaseMessage(rq.getData());
            FLease rpcrq = (FLease) rq.getRequestMessage();
            assert (message != null);
           
            InetSocketAddress sender;
            try {
                sender = new InetSocketAddress(InetAddress.getByAddress(rpcrq.getHost().getBytes()),
                                                                        rpcrq.getPort());
            } catch (UnknownHostException e) {
                return ErrorResponse.newBuilder().setErrorMessage(e.getMessage())
                                                 .setErrorType(ErrorType.IO_ERROR)
                                                 .setDebugInfo(OutputUtils.stackTraceToString(e))
                                                 .build();
View Full Code Here

Examples of org.xtreemfs.foundation.flease.Flease

       
        // if the lease is outdated or broken, it will be ignored
        if (newLease.isValid()) {
           
            // update the old lease. assume FLease will always announce lease changes in order.
            Flease oldLease = null;
            synchronized (this) {
                oldLease = lease;
                lease = newLease;
                notifyAll();
            }
           
            // notify listener if the leaseholder has changed
            if (oldLease == null || !newLeaseHolder.equals(oldLease.getLeaseHolder())) {
               
                listener.updateLeaseHolder(getAddress(newLeaseHolder));
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.