jdk/src/share/classes/sun/security/pkcs11/Token.java
changeset 21848 3902d25a64b1
parent 10363 6670d68e5011
child 23733 b9b80421cfa7
equal deleted inserted replaced
21847:8d279ff7e53e 21848:3902d25a64b1
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package sun.security.pkcs11;
    26 package sun.security.pkcs11;
    27 
    27 
    28 import java.util.*;
    28 import java.util.*;
       
    29 import java.util.concurrent.ConcurrentHashMap;
    29 import java.io.*;
    30 import java.io.*;
    30 import java.lang.ref.*;
    31 import java.lang.ref.*;
    31 
    32 
    32 import java.security.*;
    33 import java.security.*;
    33 import javax.security.auth.login.LoginException;
    34 import javax.security.auth.login.LoginException;
   149         this.sessionManager = sessionManager;
   150         this.sessionManager = sessionManager;
   150         secretCache = new KeyCache();
   151         secretCache = new KeyCache();
   151         privateCache = new KeyCache();
   152         privateCache = new KeyCache();
   152         templateManager = config.getTemplateManager();
   153         templateManager = config.getTemplateManager();
   153         explicitCancel = config.getExplicitCancel();
   154         explicitCancel = config.getExplicitCancel();
   154         mechInfoMap = Collections.synchronizedMap
   155         mechInfoMap =
   155             (new HashMap<Long, CK_MECHANISM_INFO>(10));
   156             new ConcurrentHashMap<Long, CK_MECHANISM_INFO>(10);
   156     }
   157     }
   157 
   158 
   158     boolean isWriteProtected() {
   159     boolean isWriteProtected() {
   159         return writeProtected;
   160         return writeProtected;
   160     }
   161     }