Package org.apache.ace.feedback

Examples of org.apache.ace.feedback.Descriptor


    }

    private void clean(String targetID, Long logID) throws IOException {
        obtainLock(targetID, logID);
        try {
            List<Event> events = getInternal(new Descriptor(targetID, logID, SortedRangeSet.FULL_SET));
            if (events.size() > m_maxEvents) {
                for (int i = 0; i < m_maxEvents; i++) {
                    if (events.size() > 0) {
                        events.remove(0);
                    }
View Full Code Here


         * For each local descriptor, we try to find a matching remote one. If so, we will synchronize all events that
         * the remote does not have. If we do not find a matching one at all, we send the complete local log.
         */
        List<Descriptor> result = new ArrayList<Descriptor>();
        for (Descriptor s : source) {
            Descriptor diffs = s;
            for (Descriptor d : destination) {
                if ((s.getStoreID() == d.getStoreID()) && (s.getTargetID().equals(d.getTargetID()))) {
                    SortedRangeSet rangeDiff = d.getRangeSet().diffDest(s.getRangeSet());
                    if (!isEmptyRangeSet(rangeDiff)) {
                        diffs = new Descriptor(s.getTargetID(), s.getStoreID(), rangeDiff);
                    }
                    else {
                        diffs = null;
                    }
                }
View Full Code Here

            BufferedReader queryReader = new BufferedReader(new InputStreamReader(queryInput));

            for (String line = queryReader.readLine(); line != null; line = queryReader.readLine()) {
                try {
                    result.add(new Descriptor(line));
                }
                catch (IllegalArgumentException iae) {
                    queryReader.close();

                    throw new IOException("Could not determine highest remote event id, received malformed event range: " + line);
View Full Code Here

TOP

Related Classes of org.apache.ace.feedback.Descriptor

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.