Package org.voltdb.jni

Examples of org.voltdb.jni.Sha1Wrapper


    /**
     * Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
     */
    public static long getFragmentIdForPlanHash(byte[] planHash) {
        Sha1Wrapper key = new Sha1Wrapper(planHash);
        FragInfo frag = null;
        synchronized (FragInfo.class) {
            frag = m_plansByHash.get(key);
        }
        assert(frag != null);
View Full Code Here


    /**
     * Get the statement text for the fragment identified by its hash
     */
    public static String getStmtTextForPlanHash(byte[] planHash) {
        Sha1Wrapper key = new Sha1Wrapper(planHash);
        FragInfo frag = null;
        synchronized (FragInfo.class) {
            frag = m_plansByHash.get(key);
        }
        assert(frag != null);
View Full Code Here

    /**
     * Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
     * If the plan isn't known to this SPC, load it up. Otherwise addref it.
     */
    public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) {
        Sha1Wrapper key = new Sha1Wrapper(planHash);
        synchronized (FragInfo.class) {
            FragInfo frag = m_plansByHash.get(key);
            if (frag == null) {
                frag = new FragInfo(key, plan, m_nextFragId++, stmtText);
                m_plansByHash.put(frag.hash, frag);
View Full Code Here

        return frag.plan;
    }

    @Deprecated
    public static void addFragmentForTest(long fragmentId, byte[] plan, String stmtText) {
        Sha1Wrapper key = new Sha1Wrapper(new byte[20]);
        synchronized (FragInfo.class) {
            FragInfo frag = new FragInfo(key, plan, fragmentId, stmtText);
            m_plansById.put(frag.fragId, frag);
            frag.refCount++;
        }
View Full Code Here

TOP

Related Classes of org.voltdb.jni.Sha1Wrapper

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.