Package net.rim.device.api.system

Examples of net.rim.device.api.system.PersistentObject.commit()


          PersistentObject store = PersistentStore.getPersistentObject(GUID);
          if(store.getContents() == null){
            _instance = new CustomMessageStore(GUID);
            synchronized(store){             
              store.setContents(_instance.getInboxMessages());
              store.commit();
            }
          }else{
            _instance = new CustomMessageStore(GUID, (ReadableListImpl)store.getContents());
          }
        }
View Full Code Here


   
    public void persist(){
      PersistentObject store = PersistentStore.getPersistentObject(_GUID);       
    synchronized(store){
      store.setContents(this.getInboxMessages());
      store.commit();
    }
    }


    /**
 
View Full Code Here

                PersistentObject myPersistentData;
                myPersistentData = PersistentStore.getPersistentObject(StringUtilities.stringHashToLong(args[0].toString()));
                synchronized(myPersistentData)
                {
                    myPersistentData.setContents(args[1]);
                    myPersistentData.commit();
                }
            }
            return UNDEFINED;
        }
    }
View Full Code Here

            info = SettingsManager.createStorableObject();
            CodeSigningKey codeSigningKey = CodeSigningKey.get( info );
            persistentObject.setContents( new ControlledAccess( info, codeSigningKey ) );
        }
        info.put( "type", new Integer( type ) );
        persistentObject.commit();
    }

    /**
     * Get the last known push service port
     *
 
View Full Code Here

            info = SettingsManager.createStorableObject();
            CodeSigningKey codeSigningKey = CodeSigningKey.get( info );
            persistentObject.setContents( new ControlledAccess( info, codeSigningKey ) );
        }
        info.put( "port", new Integer( port ) );
        persistentObject.commit();
    }

    /**
     * Get the application descriptor arguments
     *
 
View Full Code Here

        if( info == null ) {
            info = SettingsManager.createStorableObject();
            persistentObject.setContents( info );
        }
        info.put( "appDescriptor", args );
        persistentObject.commit();
    }
}
View Full Code Here

            }
            // Otherwise, create the cacheTable entry in persistent store.
            else {
                synchronized( cacheTableStore ) {
                    cacheTableStore.setContents( new ControlledAccess( _cacheTable, codeSigningKey ) );
                    cacheTableStore.commit();
                }
            }

        } catch( Exception e ) {
        }
View Full Code Here

            // Update cache table in persistent store.
            PersistentObject cacheTableStore = PersistentStore.getPersistentObject( _storeKey );
            CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
            synchronized( cacheTableStore ) {
                cacheTableStore.setContents( new ControlledAccess( _cacheTable, codeSigningKey ) );
                cacheTableStore.commit();
            }
        }
    }

    private void refreshCache( int spaceToFree ) {
View Full Code Here

            Object cacheItemObj = cacheItemStore.getContents( codeSigningKey );
            if( cacheItemObj instanceof ByteVectorWrapper ) {
                // Remove the entry.
                synchronized( cacheItemStore ) {
                    cacheItemStore.setContents( null );
                    cacheItemStore.commit();
                }
            }
        }

    }
View Full Code Here

        synchronized( persistentObject ) {
            try {
                // Get the code signing key associated with this BlackBerry WebWorks Application.
                CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
                persistentObject.setContents( new ControlledAccess( pDataStore, codeSigningKey ) );
                persistentObject.commit();
            } catch ( ControlledAccessException cae ) {
                throw new IOException();
            } catch ( NonPersistableObjectException npoe ) {
                throw new IOException();
            } catch ( PersistentContentException pce ) {
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.