Fix bug in ReplicatedLogImpl#removeFrom and use akka-persistence for removing entries
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ElectionTermImpl.java
diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ElectionTermImpl.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ElectionTermImpl.java
deleted file mode 100644 (file)
index 6a598be..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.cluster.raft;
-
-public class ElectionTermImpl implements ElectionTerm{
-    /**
-     * Identifier of the actor whose election term information this is
-     */
-    private final String id;
-
-    private long currentTerm;
-
-    private String votedFor;
-
-    public ElectionTermImpl(String id) {
-        this.id = id;
-
-        // TODO: Read currentTerm from some persistent state
-        currentTerm = 0;
-
-        // TODO: Read votedFor from some file
-        votedFor = "";
-    }
-
-    public long getCurrentTerm() {
-        return currentTerm;
-    }
-
-    public String getVotedFor() {
-        return votedFor;
-    }
-
-    public void update(long currentTerm, String votedFor){
-        this.currentTerm = currentTerm;
-        this.votedFor = votedFor;
-
-        // TODO : Write to some persistent state
-    }
-}