Examples of PendingWrite


Examples of telefono.almacen.PendingWrite

     * @return true si se a�adi� el elemento, false, si se sobreescribi� un elemento
     * ya existiente
     */
    synchronized public boolean add(String nombre, byte[] valor)
    {
        PendingWrite buscado=busca(nombre);
        if(buscado==null)//no se encontr�
        {
            PendingWrite next=new PendingWrite();
            next.nombre=nombre;
            next.valor=valor;
            pendings.addElement(next);
            notifyAll();
            return true;
View Full Code Here

Examples of telefono.almacen.PendingWrite

     */
    synchronized public PendingWrite pop()
    {
        if(pendings.size()>1)
        {
            PendingWrite result=(PendingWrite)pendings.firstElement();
            pendings.removeElement(result);
            return result;
        }
        else
            return null;
View Full Code Here

Examples of telefono.almacen.PendingWrite

    {
        while(pendings.size()<1)
        {
            wait();
        }
        PendingWrite result=(PendingWrite)pendings.firstElement();
        pendings.removeElement(result);
        return result;
    }
View Full Code Here

Examples of telefono.almacen.PendingWrite

    /** busca en el vector si hay alguno nuevo, y lo retorna
     * @return null si no lo encuentra, o el valor, si s� lo encuentra.
     */
    private PendingWrite busca(String nombre)
    {
        PendingWrite current;
        for(int i=0;i<pendings.size();i++)
        {
            current=(PendingWrite)pendings.elementAt(i);
            if(current.nombre.equals(nombre))
            {
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.