private void internalClear() { persistenceContext.clear(); actionQueue.clear(); final ClearEvent event = new ClearEvent( this ); for ( ClearEventListener listener : listeners( EventType.CLEAR ) ) { listener.onClear( event ); } }
public void clear() { errorIfClosed(); checkTransactionSynchStatus(); persistenceContext.clear(); actionQueue.clear(); }
public void clear() { errorIfClosed(); checkTransactionSynchStatus(); persistenceContext.clear(); actionQueue.clear(); }
private void replaceActionQueue(ActionQueue actionQueueNew) { if ( actionQueue.hasAnyQueuedActions() ) { throw new IllegalStateException( "cannot replace an ActionQueue with queued actions " ); } actionQueue.clear(); ObjectInputStream ois = null; try { ois = new ObjectInputStream( new ByteArrayInputStream( serializeActionQueue( actionQueueNew ) ) ); actionQueue = ActionQueue.deserialize( ois, this ); } catch (IOException ex) { throw new SerializationException( "could not deserialize the action queue", ex ); } catch (ClassNotFoundException ex) { throw new SerializationException( "could not deserialize the action queue", ex ); } finally { try { if (ois != null) ois.close(); } catch (IOException ignore) { } } }
private void replaceActionQueue(ActionQueue actionQueueNew) { if ( actionQueue.hasAnyQueuedActions() ) { throw new IllegalStateException( "cannot replace an ActionQueue with queued actions " ); } actionQueue.clear(); ObjectInputStream ois = null; try { ois = new ObjectInputStream( new ByteArrayInputStream( serializeActionQueue( actionQueueNew ) ) ); actionQueue = ActionQueue.deserialize( ois, this ); } catch (IOException ex) { throw new SerializationException( "could not deserialize the action queue", ex ); } catch (ClassNotFoundException ex) { throw new SerializationException( "could not deserialize the action queue", ex ); } finally { try { if (ois != null) ois.close(); } catch (IOException ignore) { } } }
private void internalClear() { persistenceContext.clear(); actionQueue.clear(); final ClearEvent event = new ClearEvent( this ); for ( ClearEventListener listener : listeners( EventType.CLEAR ) ) { listener.onClear( event ); } }