Package com.pcmsolutions.device.EMU.E4.preset

Examples of com.pcmsolutions.device.EMU.E4.preset.NoSuchContextException


        return rp;
    }

    public void releaseContext(SampleContext sc) throws NoSuchContextException {
        if (!assertContext(sc))
            throw new NoSuchContextException();

        HashMap subContextMap = (HashMap) sc2sc.get(sc);

// release subcontexts
        Iterator i = subContextMap.keySet().iterator();
View Full Code Here


        }
    }

    public void releaseContextSample(SampleContext sc, Integer sample) throws NoSuchContextException, NoSuchSampleException {
        if (!assertContext(sc))
            throw new NoSuchContextException();

        Map samples = (Map) sc2s.get(sc);
        if (!samples.containsKey(sample))
            throw new NoSuchSampleException(sample);
View Full Code Here

        releaseSample(sc, sample);
    }

    public SampleContext newContext(SampleContext sc, String name, Integer[] samples) throws NoSuchSampleException, NoSuchContextException {
        if (!assertContext(sc))
            throw new NoSuchContextException();

        SampleContext npc;
        for (int n = 0; n < samples.length; n++)
            if (!hasSample(sc, samples[n]))
                throw new NoSuchSampleException(samples[n]);
View Full Code Here

        return npc;
    }

    public void removeSamplesFromContext(SampleContext src, Integer[] samples) throws NoSuchContextException, NoSuchSampleException {
        if (!assertContext(src)) {
            throw new NoSuchContextException();
        }
        for (int n = 0; n < samples.length; n++)
            if (!hasSample(src, samples[n]))
                throw new NoSuchSampleException(samples[n]);
        for (int n = 0; n < samples.length; n++)
View Full Code Here

            removeSampleFrom(src, samples[n]);
    }

    public void addSamplesToContext(SampleContext dest, Integer[] samples) throws NoSuchContextException, NoSuchSampleException {
        if (!assertContext(dest)) {
            throw new NoSuchContextException();
        }
        for (int n = 0; n < samples.length; n++)
            if (!readsSample(dest, samples[n]))
                throw new NoSuchSampleException(samples[n]);
        for (int n = 0; n < samples.length; n++)
View Full Code Here

            addSampleTo(dest, samples[n]);
    }

    public List expandContextWithEmptySamples(SampleContext src, SampleContext dest, Integer reqd) throws NoSuchContextException {
        if (!assertContext(src) || !assertContext(dest)) {
            throw new NoSuchContextException();
        }
        List found = findEmptySamples(src, reqd.intValue());
        for (int n = 0; n < found.size(); n++)
            transferSample(src, dest, (Integer) found.get(n));
View Full Code Here

    }

    public Set getSampleIndexesInContext(SampleContext sc) throws NoSuchContextException {
        if (!assertContext(sc))
            throw new NoSuchContextException();

        Set rv;
        // rv = ((Map) ((TreeMap) sc2s.get(sc)).clone()).keySet();
        rv = new TreeSet(((TreeMap) sc2s.get(sc)).keySet());
        return rv;
View Full Code Here

        return rv;
    }

    public Set getReadableSampleIndexes(SampleContext sc) throws NoSuchContextException {
        if (!assertContext(sc))
            throw new NoSuchContextException();
        TreeMap sortMap = new TreeMap();
        sortMap.putAll(s2sl);
        return sortMap.keySet();
    }
View Full Code Here

        }
    }

    public void lockSampleRead(SampleContext sc, Integer sample) throws NoSuchSampleException, NoSuchContextException {
        if (sc == null)
            throw new NoSuchContextException();

        RWLock pLock = (RWLock) s2sl.get(sample);

        if (pLock != null)
            pLock.read();
View Full Code Here

            throw new NoSuchSampleException(sample);
    }

    public boolean tryLockSampleRead(SampleContext sc, Integer sample) throws NoSuchSampleException, NoSuchContextException {
        if (sc == null)
            throw new NoSuchContextException();

        RWLock pLock = (RWLock) s2sl.get(sample);
        if (pLock != null) {
            return pLock.tryRead();
        } else
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.preset.NoSuchContextException

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.