KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > prevayler > implementation > snapshot > NullSnapshotManager


1 //Prevayler(TM) - The Free-Software Prevalence Layer.
2
//Copyright (C) 2001-2003 Klaus Wuestefeld
3
//This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4

5 package org.prevayler.implementation.snapshot;
6
7 import java.io.IOException JavaDoc;
8
9 public class NullSnapshotManager extends SnapshotManager {
10
11     private final String JavaDoc _snapshotAttemptErrorMessage;
12
13     public NullSnapshotManager(Object JavaDoc newPrevalentSystem, String JavaDoc snapshotAttemptErrorMessage) {
14         super(newPrevalentSystem);
15         _snapshotAttemptErrorMessage = snapshotAttemptErrorMessage;
16     }
17     
18     public void writeSnapshot(Object JavaDoc prevalentSystem, long version) throws IOException JavaDoc {
19         throw new IOException JavaDoc(_snapshotAttemptErrorMessage);
20     }
21
22 }
23
Popular Tags