a779ed0854d685c1fc25aa40029cae7a67511f9a
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / NonPersistent.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore.messages;
10
11 /**
12  * A NonPersistent message is to be used when we want to trigger state update
13  * for an actor without actually persisting the data to disk. This could be
14  * useful for test purposes.
15  */
16 public class NonPersistent {
17     private final Object payload;
18
19     public NonPersistent(Object payload){
20         this.payload = payload;
21     }
22
23     public Object payload() {
24         return payload;
25     }
26
27     public static NonPersistent create(Object payload){
28         return new NonPersistent(payload);
29     }
30 }