Java Code Examples for com.sun.corba.se.impl.orbutil.ORBUtility.bytesToInt()

The following are Jave code examples for showing how to use bytesToInt() of the com.sun.corba.se.impl.orbutil.ORBUtility class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: TransientObjectManager.java   Source Code and License Vote up 6 votes
public synchronized java.lang.Object lookupServant(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    int counter = ORBUtility.bytesToInt(transientKey,4);

    if (orb.transientObjectManagerDebugFlag)
        dprint( "lookupServant called with index=" + index + ", counter=" + counter ) ;

    if (elementArray[index].counter == counter &&
        elementArray[index].valid ) {
        if (orb.transientObjectManagerDebugFlag)
            dprint( "\tcounter is valid" ) ;
        return elementArray[index].servant;
    }

    // servant not found
    if (orb.transientObjectManagerDebugFlag)
        dprint( "\tcounter is invalid" ) ;
    return null;
}
 
Example 2
Project: OpenJSharp   File: TransientObjectManager.java   Source Code and License Vote up 6 votes
public synchronized java.lang.Object lookupServantData(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    int counter = ORBUtility.bytesToInt(transientKey,4);

    if (orb.transientObjectManagerDebugFlag)
        dprint( "lookupServantData called with index=" + index + ", counter=" + counter ) ;

    if (elementArray[index].counter == counter &&
        elementArray[index].valid ) {
        if (orb.transientObjectManagerDebugFlag)
            dprint( "\tcounter is valid" ) ;
        return elementArray[index].servantData;
    }

    // servant not found
    if (orb.transientObjectManagerDebugFlag)
        dprint( "\tcounter is invalid" ) ;
    return null;
}
 
Example 3
Project: openjdk-jdk10   File: TransientObjectManager.java   Source Code and License Vote up 6 votes
public synchronized java.lang.Object lookupServant(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    int counter = ORBUtility.bytesToInt(transientKey,4);

    if (orb.transientObjectManagerDebugFlag)
        dprint( "lookupServant called with index=" + index + ", counter=" + counter ) ;

    if (elementArray[index].counter == counter &&
        elementArray[index].valid ) {
        if (orb.transientObjectManagerDebugFlag)
            dprint( "\tcounter is valid" ) ;
        return elementArray[index].servant;
    }

    // servant not found
    if (orb.transientObjectManagerDebugFlag)
        dprint( "\tcounter is invalid" ) ;
    return null;
}
 
Example 4
Project: openjdk-jdk10   File: TransientObjectManager.java   Source Code and License Vote up 6 votes
public synchronized java.lang.Object lookupServantData(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    int counter = ORBUtility.bytesToInt(transientKey,4);

    if (orb.transientObjectManagerDebugFlag)
        dprint( "lookupServantData called with index=" + index + ", counter=" + counter ) ;

    if (elementArray[index].counter == counter &&
        elementArray[index].valid ) {
        if (orb.transientObjectManagerDebugFlag)
            dprint( "\tcounter is valid" ) ;
        return elementArray[index].servantData;
    }

    // servant not found
    if (orb.transientObjectManagerDebugFlag)
        dprint( "\tcounter is invalid" ) ;
    return null;
}
 
Example 5
Project: OpenJSharp   File: TransientObjectManager.java   Source Code and License Vote up 5 votes
public synchronized void deleteServant(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    if (orb.transientObjectManagerDebugFlag)
        dprint( "deleting servant at index=" + index ) ;

    elementArray[index].delete(freeList);
    freeList = elementArray[index];
}
 
Example 6
Project: openjdk-jdk10   File: TransientObjectManager.java   Source Code and License Vote up 5 votes
public synchronized void deleteServant(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    if (orb.transientObjectManagerDebugFlag)
        dprint( "deleting servant at index=" + index ) ;

    elementArray[index].delete(freeList);
    freeList = elementArray[index];
}